27 - Basic Django Forms - Python & Django 3.2 Tutorial Series

Поделиться
HTML-код
  • Опубликовано: 9 фев 2025
  • 27 - Basic Django Forms - Python & Django 3.2 Tutorial Series
    Try Django 3.2 is a series to teach you the fundamentals of creating web applications with Python & Django by building a real project step-by-step.
    ⦿ Playlist: • Try Django 3.2 - Pytho...
    ⦿ DigitalOcean $100 Promo: do.co/cfe-youtube
    ⦿ Code: github.com/cod...
    ⦿ Subscribe: cfe.sh/youtube
    ⦿ Setup Video for Python 3 & Django 3: • Install & Setup Python...

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

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

    best django course on yt!

  • @tigere01
    @tigere01 3 года назад +10

    @11:03 - Absolutely, a freelancing course will be extremely useful.

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

    quality content all the way through, loving the tutorial, loving Django!

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

    if anyone get stuck in forms, don't worry it's normal
    so, what to do now?
    rewatch the video and write the code as the instructor wrote it keep working and rewatch the video until you get the same result that shown in the video, then search for each function you use (is_valid(), cleaned_data(), etc....) and understand the concept of this function (what the function do and what the function returns, when the function return False and when to return True as an example) this work with me
    if you don't understand it from the 10th time, don't worry, it take me 3 days to understand this basic form
    keep calm and work harder, that's the key
    last tip: if stuck in this video more than one week, go directly to the next video you'll see a better way

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

      No truer words have been spoken 😂😂

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

      @@chiomaobiajulu4363 thank you very much because you remind me with this comment, five months ago I wrote this comment and now I am still studying django and deep diving in other harder concepts, we have to work hard everyday, this is the secret .
      Thank you agian

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

      @@maamounhajnajeeb209 you’re welcome. I’m also refreshing my knowledge in Django. I want to build a project soon using Django and react in the front end. So I’m about to learn react for real. Lastly, I’m looking at playing a little with Django rest framework (which sounds intimidating but I have to try 🙏🏽)

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

      keep going@@chiomaobiajulu4363

  • @ahmetdiril824
    @ahmetdiril824 3 года назад +6

    11:20 I see that you created two class methods clean_data and clean. But I don't see where you called them and how those print commands are being executed.

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  3 года назад +7

      When use is form.is_valid() in a view it calls the clean methods

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

      @@CodingEntrepreneurs Thanks for answering this. I was getting confused about the exact same thing.

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

      can someone explain why it actually works that way?

    • @a.r.khankashmir8264
      @a.r.khankashmir8264 2 года назад +1

      @@CodingEntrepreneurs is both clean_title & clean method will be called?

    • @marcitakacs1271
      @marcitakacs1271 4 месяца назад

      @@sastapts The clean_() method is called on a form subclass - where is replaced with the name of the form field attribute. This method does any cleaning that is specific to that particular attribute, unrelated to the type of field that it is.

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

    Thanks

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

    how does clean_title(), clean() having same way of calling the cleaned_data but still returning different values, clean_title() is only returning title, whereas clean is returning title, content, I had tried clean_content() to check with content only but it didn't work. Video at @12:04 please answer me. Thanks in advance....

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

    How can you modify how the form looks? I cant seem to target the html tags in css because they dont have class names. So how do i make the forms look nicer?

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

    Hey, I see that you are using render() after doing POST and I read on on Django Official Tut Part 4 and some answers on StackOverflow that we should return with HttpResponseRedirect.
    Is there something I'm missing here? Also when I use render and refresh my page, the form gets submitted again.

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

      probably why I got "The view articles.views.article_create_view didn't return an HttpResponse object. It returned None instead."

  • @Sumitkumar-ok7wp
    @Sumitkumar-ok7wp Год назад +1

    can anyone explain what is meant by cleaned cuz its too much unclear to me

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

      Raw input = dirty
      Django forms clean this data (preventing scripting attacks)
      Cleaned data = savable or usable.

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

    2:23 in {%if not created %} suddenly raise error with me unlike before I DON'T KNOW WHY !!!!

  • @iangarrigan9451
    @iangarrigan9451 Год назад +2

    im super confused with this