Django - Building Form Wizards with formtools and django-crispy-forms

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

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

  • @ExcellentSports-w2k
    @ExcellentSports-w2k Год назад +1

    Hello sir, my form is not getting saved, done method is not working. Please help

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

      What code do you have in your done method?

  • @miclemabasie4424
    @miclemabasie4424 15 дней назад +1

    Perfectly Done, Thank you sir.

  • @zackmcnelly
    @zackmcnelly Год назад +8

    Underated channel, clear and precise instructions. Thank you!

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

    does it work with django-widget-tweaks?

  • @yakubuabdullatif4321
    @yakubuabdullatif4321 10 месяцев назад +3

    I just discovered your channel. Thanks for all those great tutorials you are putting out on here.

    • @bugbytes3923
      @bugbytes3923  10 месяцев назад

      Thanks a lot! Glad you're liking them :)

  • @ExcellentSports-w2k
    @ExcellentSports-w2k Год назад

    in my done method class MultiStepFormView(SessionWizardView):
    form_list = [ TimeSlotForm, DetailForm]
    template_name = 'sm_appointment/index.html'

    def done(self, form_list, **kwargs):
    form_data = [form.cleaned_data for form in form_list]
    print(form_data)
    return HttpResponseRedirect('form submitted')

  • @ДимаПолушкин-ш6б
    @ДимаПолушкин-ш6б 2 дня назад

    как всегда лучший! спасибо брат!!!

  • @Altar-of-God
    @Altar-of-God Год назад

    Hello! I have difficulty saving when I use the def done(self, form_list): function

  • @robhafemeister3100
    @robhafemeister3100 Год назад +4

    Great video as always, would love to see the form preview you mentioned as well.

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

      Thanks a lot Rob! I'll have a look at creating a short video on that one too 👍

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

    wow you are a wizard by reading my mind.. I was just struggling with this :) thanks a lot for the video

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

    is it possible to present a single model into multi-step forms, say 3 forms for model Employee?

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

      Good question. Yes, this is possible, but you'll have to build three different Form subclasses (NOT ModelForms) and then combine the data at the end in the done() method.

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

      @@bugbytes3923 thanks

    • @developershub2024
      @developershub2024 6 месяцев назад

      @@bugbytes3923 i have been looking for this ...... but what do you mean by building three different Form subclasses (NOT ModelForms) and then combine the data at the end in the done() method

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

    Always enjoyed your content. Kindly do something on the complete ecosystem: Django + HTMX (for AJAX) + HyperScript (for other dynamic aspects) + TailWind

    • @bugbytes3923
      @bugbytes3923  Год назад +3

      Thanks a lot!
      That's coming up before summer for sure.

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

    It feels like 2023 is going be a fun year with your caviar tutorial mate 🙌🏾. This is a master piece 🧩. Thank for all. Good job !

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

      Thank you mate!
      Much appreciated and all the best for 2023.

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

    Very nice video, very helpful. Would love to see a follow-up about form preview. Thanks.

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

      Thank you! I did a follow-up on Previews here:
      ruclips.net/video/d5YlrHe0uzw/видео.html

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

    nice work. For me, I'd rather stick to htmx than this. After watching your playlist on it, I'm so loving it

  • @paolovargasdegasperi6265
    @paolovargasdegasperi6265 10 дней назад

    This is great, thank you so much!

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

    Great video as always 👍🏼
    Now in react please; seems much easier to handle in the backend! If you have to jump through that many hoops to make a simple Wizard in Django, I'd think it's the same effort to do it in React

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

      Thanks! I haven't done anything with React on the channel yet, but I guess it'll happen at some point... 😄

  • @grant4458
    @grant4458 6 месяцев назад

    Excellent video as usual. Yes please to more form videos. Is it possible to have duplicate forms - lets say you have a list of goals, how would you dynamically add more goals to the wizard process? Would you create a new page for each goal or would you handle that on a single page? Probably a single page come to think of it. How would you handle that BugBytes?

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

    Hello, Great Tutorial !
    especially I'm working on register wizard :
    my question is how to save user object based on all form_list ?
    I mean how to do something like this: user = form_list.save(commit=False)

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

    Good video ;) worth to add atomic transaction for db operations

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

      Thanks! And that's a very good point! The entire done() method should really be wrapped in a transaction.

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

    Hey mate, here is my question : Can we have a different template for each form in the form Wizards with formtools (django-formtools) ? If yes, please make a tutorial to show us the usage thank you.

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

      Hey mate. Yes, for sure - you can have a template for each step in the form wizard. I'll try and create a short demo!

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

      Thank you in advance my dear, I really need it.

  • @jacob_mp
    @jacob_mp 4 месяца назад +1

    Very Usefull. Great tutorial.

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

    Hello sir, my form is not submitting, done method is not working. Please help

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

    Nice as always, waiting for full stack app 😁

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

    Good video as usual.When is the complete Django,htmx , alpine project due?

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

      Thanks! I hope to start releasing that in the next month, but it'll likely be around April.

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

      @@bugbytes3923 thanks

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

    Just curious - where's your accent from? I'm thinking Scotland, but I'm not sure if I've heard it before... 🙂

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

      Hi Bruno - yes, Scotland 🙂
      Hope the accent is not too difficult to understand!

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

      Not at all! Very clear and interesting accent. Thanks for replying

  • @williamlee6302
    @williamlee6302 8 месяцев назад

    Very practical tutorial always. Thank you very much.

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

    what about using a drop down list within a wizard so that it should be having a different next page based on the option selected on the drop down list

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

    thank you

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

      You're welcome, thanks for the comment!

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

    Nice work. Thank you.

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

      You're welcome, thanks for watching!

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

    rly nice tutorial, very informative nad useful. Thank You. Yes we want more django forms :)

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

      Thanks a lot! Much appreciated!

  • @vivaldi-qo7xj
    @vivaldi-qo7xj Год назад +1

    thanks. its useful.

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

    Thank you sir!

  • @DMUT-c3e
    @DMUT-c3e 10 месяцев назад

    Thank you!

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

    thank you!

  • @kaushikkarandikar2489
    @kaushikkarandikar2489 7 месяцев назад

    Exactly what I was looking for! Very informative video. Cheers

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

    Awesome 🙂

  • @yakubuabdullatif4321
    @yakubuabdullatif4321 10 месяцев назад

    I just discovered your channel. Thanks for all those great tutorials you are putting out on here.

  • @anthonykarungu1419
    @anthonykarungu1419 5 месяцев назад

    I love the way you teaching sir. especially the use of documentation in your tutorials. Very clear and understandable

    • @bugbytes3923
      @bugbytes3923  5 месяцев назад

      Thanks a lot! Glad you like the videos!

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

    Thanks for this another excellent video. It'll be good to have a more styled form and differents types of forms.
    Thanks again.

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

    This is a great tutorial. Do you think this will work in an application that uses mulitforms?

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

      Thank you! I'll be honest, I'm not sure what multiforms are, really.
      The idea behind the wizard is to take multiple forms and submit them all in one staged workflow. Are multiforms similar to this?

  • @Hohihiho56
    @Hohihiho56 5 месяцев назад

    All of your videos are awesome no doubt

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

    Useful content as always,
    Congrats👍

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

    Bro how tf you always know exactly what I've been reading about and trying to figure out XD

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

      Haha good timing ;) Thank you.

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

      @@bugbytes3923 Perfect lol. Literally started looking into formtools yesterday to implement product attributes like in django-oscar. Weirdly enough, same thing with htmx and the webcomponent related packages. Thanks for the great content! Learn more in every one of ur vids than hours of looking through SO, docs, source code, and asking gpt3

  • @sisccoa
    @sisccoa 10 месяцев назад

    Congratulations man ! Very interesting.
    Paulo from Brasil.

    • @bugbytes3923
      @bugbytes3923  10 месяцев назад +1

      Thanks a lot Paulo! Greetings from Glasgow.

    • @sisccoa
      @sisccoa 9 месяцев назад

      @@bugbytes3923 Please, if it is possible for you help me pleaase. How to do if I use forms.ChoiceField not forms.BooleanField. How I fixed cleaned_data = wizard.get_cleaned_data_for_step and condition_dict? I do not want to importunate you. Thank you so much.

    • @sisccoa
      @sisccoa 9 месяцев назад

      In fact I have 5 forms.

  • @raulcorrear.4128
    @raulcorrear.4128 Год назад

    Increible tutorial super claro, deberia tener más me gusta (ya colaboré con uno jeje) Saludos desde Lima, Perú. Incredible tutorial, very clear! It should have more likes (I already contributed with one, hehe). Greetings from Lima, Peru.

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

      Gracias! And thank you for the like! Would love to visit your country some day. Greetings from Scotland.

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

    Thanks!

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

    Great lesson

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

    Thank you for your work and everything you "return to the community". The niche which you found yourself is excellent - especially htmx helped me a lot. I started following you, when you had just over 3k followers. You well deserve the growth of your channel!

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

      Thanks a lot Adriano! Really appreciate that nice comment - glad the channel has helped!

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

      Btw. did you think of extending this tutorial with an htmx/modal tutorial? Or is that straight forward and easily implemented? Guess what I am working on right now 😂