Django Tutorial #26 - Model Forms

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 36

  • @JJnnaatt
    @JJnnaatt 4 года назад +11

    3:34 Instead of fields = ['title', 'body', 'slug', 'thumb'] you can write fields = '__all__' to add all fields in the model.

    • @enos5192
      @enos5192 2 года назад +4

      Date is not needed

    • @intensiveadvancedmath5281
      @intensiveadvancedmath5281 Год назад +1

      @@enos5192 does is differ? Anyway fields = '__all__' renders the same thing

    • @cfwebdeveloper
      @cfwebdeveloper Год назад +1

      I think you could do exclude in it now.

  • @swodeshbastakoti5423
    @swodeshbastakoti5423 3 года назад

    Thanks Man. Searched this everywhere.

  • @preetsingh2133
    @preetsingh2133 3 года назад +2

    Why do we need to create forms.py file to create new Class? Can't we use the model from Model.py class only?

  • @ridwanray
    @ridwanray 5 лет назад +1

    Thanks for this Bekky........... Would I need an API if i want only successful payment saved into the database
    when a submit button is cliked? Thanks and hope to here from you...

  • @vashisthegde2169
    @vashisthegde2169 6 лет назад +5

    Hey, Net Ninja! watched all of your videos, and they are awesome! i was wondering if you could make a video regarding the cookies and the sessions of Django.. i tried to look up videos about this but couldn't find anybody who could explain as good as you do... !

  • @theangularavenger1289
    @theangularavenger1289 5 лет назад +1

    At 7:00 why we are using the same url for inputing and posting the data, can't we use two different urls

  • @trzztrzz2477
    @trzztrzz2477 Год назад

    Can you please explain what is the Meta class?

  • @wisamkhalid5663
    @wisamkhalid5663 6 лет назад

    finally ...we were waiting for your new videos in this series... happy holidays

  • @zimtfilm
    @zimtfilm 6 лет назад +3

    hey! i love your tutorials. thank you for the great work. Will you do a tutoral for djanago 2.0 ?

    • @malikmstr5133
      @malikmstr5133 6 лет назад +2

      there is no big changes however take a look to Flask it's better and easier

  • @ewkaczka4320
    @ewkaczka4320 3 года назад

    Whenever I click on a field in my form to type in some stuff it refreshes the whole page... How can I get rid of that? Or - what did I do wrong?

  • @DanieleTrapani
    @DanieleTrapani 6 лет назад

    Welcome back and happy new year Shaun!

  • @wetpenguin
    @wetpenguin 6 лет назад +2

    Nobody writes slug manually.. You should have shown how to make apropriate slug field, that defaults to title, but with '-' instead of spaces. Otherwise amazing tutorial series! I especially love that youre using method based views instead of class based ones.

    • @malikmstr5133
      @malikmstr5133 6 лет назад +1

      it's easy you can make it by yourself, make a simple function that has the title as argument then use the replace function, it would be like this return title.replace(" ","-") finally save it on your database that's all

  • @ЕвгенийПетров-в5п
    @ЕвгенийПетров-в5п 3 месяца назад

    make sure in newly made forms file you
    call "model" a "model"
    and
    "fields" "fields"
    also "Meta" "Meta"

  • @ashimsinghthapa3873
    @ashimsinghthapa3873 4 года назад

    It dosenot redirect . all data in form is shown in url and it dont redirect... Anyone please help

  • @yashv2000
    @yashv2000 4 года назад

    Can We just use Any other name than Meta ... in class Meta declaration

  • @KhaledChikhComptable
    @KhaledChikhComptable 5 лет назад

    Very very good job thank you

  • @anikhossain6451
    @anikhossain6451 6 лет назад +1

    When he added the thumb in Article field in this seriese?

    • @WaleedAsender
      @WaleedAsender 4 года назад

      ruclips.net/video/LAIVhl2CG8E/видео.html

  • @elenaperez6327
    @elenaperez6327 3 года назад

    When I go to localhost:8000articles/create it takes me back to the login page instead of the new create article page. I have gone over the and traced my steps, my code is the same as the tutorial but I just can't fix this. Can anyone help please?

    • @DanielLeachTen
      @DanielLeachTen 3 года назад

      I'm having the same issue!

    • @amazinghenry8893
      @amazinghenry8893 2 года назад

      you have to login in before you can proceed to "create" because you have the decorator @login_required(login_url="/accounts/login") in your views.py

  • @Lbmaniak
    @Lbmaniak 6 лет назад +1

    thx

  • @calibur5518
    @calibur5518 3 года назад

    Not Found: /articles/create/{'articles/create'}

    • @calibur5518
      @calibur5518 3 года назад +1

      ] "POST /articles/create/%7B'articles/create'%7D HTTP/1.1" 404 3345

  • @runthomas
    @runthomas 6 лет назад

    didnt make any sense how the post and get request are gonna be the same.

  • @ManuYadav-oi4sd
    @ManuYadav-oi4sd 4 года назад

    nice

  • @gururajmoger8649
    @gururajmoger8649 6 лет назад

    Please add this to playlists

  • @KevinTempelx
    @KevinTempelx 4 года назад

    Take my money.