Hi @BugBytes, thanks for keep pumping out Django + HTMX videos. Happy New Year mate. Looking forward to seeing more in 2022.
@bugbytes39233 жыл бұрын
Thank you mate! Happy new year to you too, all the best for 2022.
@silkogelman3 жыл бұрын
Wow django-forms-dynamic seems like a great library, so cool it has Htmx integration options too! Thank you for your detailed explanation BugBytes. Also very nice that you prepared this with sample data etc to get started easily. 👍👍
@bugbytes39233 жыл бұрын
Thanks Sil! 😀 Yep, I like django-forms-dynamic - building the dynamic behaviour within the Form class makes sense to me. Glad you enjoyed the video!
@bicifix2 жыл бұрын
Wow, I've been struggling making a complex form with many internal dependencies, and this video was exactly what I needed. Thanks.
@bugbytes39232 жыл бұрын
Thank you! I'm glad it has helped :)
@andrewwarner39692 жыл бұрын
Thank you for this! Definitely going to send a coffee your way. Is there a way to add a third tier to the select, based on the 2nd select. eg. 1st select > 2nd select > 3rd select? Really appreciate any help on this.
@bugbytes39232 жыл бұрын
I've been meaning to add a video on this. Going to prepare it soon, hopefully! And thank you very much!
@andrewwarner39692 жыл бұрын
@@bugbytes3923 ahh perfect thank you! I tried to replicate again what you showed in your video but it just broke the initial select.
@Christian-qy7lg Жыл бұрын
@@andrewwarner3969 Has anyone already managed to do this with the third select? The first two work perfectly for me, but the third does not work according to the same scheme. Thanks a lot!
@andrewwarner3969 Жыл бұрын
@@Christian-qy7lg hey. Yeah, BugBytes created a video on the approach kzbin.info/www/bejne/eKnbdYSFpMSlhKs
@Said664016 Жыл бұрын
@@Christian-qy7lg I am also curious how to do third select only with form. There is a video about 3-Level Chained Dropdowns, but that one works on models. Hope to manage with that. Thanks!
@seydinaoumarsamabaly18063 жыл бұрын
You really are a source of inspiration ! Since I started following you I'm always amazed by your contents ! Big respect mate. Happy New Year 2022. GOD bless you
@bugbytes39233 жыл бұрын
Thank you very much man! :)
@fernandtape93633 жыл бұрын
Another nice video. Thank you to make us discover this library.
@bugbytes39233 жыл бұрын
Thank you!
@nishasingh3097 Жыл бұрын
Thanks a lot ! It is a huge help
@TravisPickle3 жыл бұрын
awesome job, thanks
@bugbytes39233 жыл бұрын
Thank you!
@Zeksait11 ай бұрын
In a view, I cannot custom write values to initial, since the form is rendered and calls the replacement functions. help me please
@Zeksait11 ай бұрын
I forgot to change the queryset in views.py form.fields['client'].queryset = ... =)
@aicreativetools11 ай бұрын
Hi @BugBytes, how can i use with model form with Select Field ?
@weholt2 жыл бұрын
I love your videos :-) Do you know if there's a way to avoid hardcoding paths in the code, like in the part where hx-get is fetching the modules part, but using a hardcoded path /modules/ instead of {% url 'modules' %}?
@bugbytes39232 жыл бұрын
Thanks Thomas! :) If you are adding hx-get to the raw HTML element, you can use the {% url 'modules' %} template tag (I think I did this in the previous video). I had to change it to hard-code the URL in this video - I'm not sure how to use the url template-tag within the {% render_field %} expression - if anybody has any ideas on this, it'd be good to get a solution. I didn't want to hard-code the path, but couldn't find an alternative unfortunately!
@Famelhaut9 ай бұрын
@@bugbytes3923 You need to use with, like so: {% url 'settings' var1 var2 as action_url %} {% include "default_form.html" with action=action_url %}
@edwardkim15392 жыл бұрын
Thanks for great tutorials. I was able to generate chained dropdowns with a HTMX to add but getting an error when updating: BaseForm.__init__() got an unexpected keyword argument 'instance'. Can you show us how to update using django-forms-dynamic.
@LewisFletcher9812 жыл бұрын
Hey @BugBytes, awesome and helpful video. When I attempt to save the form to my database, it says it is missing that attribute and it seems the dynamic field cant't be saved. Any chance you have a solution for this? Thanks!
@jorgeav527-xyz2 жыл бұрын
how can I achieve this {% for u in formset.forms %} {% render_field u.name hx-target="name-{{forloop.counter0}}" %} {% endfor %}
@gliffuct Жыл бұрын
Cheers buddy helped a lot thank you. Any tips for adding third or fourth layers?
@pedrokapingala44112 жыл бұрын
Nice video and thanks very much. could you make a another video but using dropdown list with the forms to add data in the table. that one you are using the view.....
@jodikurniawan373211 ай бұрын
how to save data using modelform
@Zeksait11 ай бұрын
this doesn't work if you use two more child fields as well. I'm still learning how to do it
@Zeksait11 ай бұрын
I had to wrap several fields in divs and replace this html block as one whole. This is how it works
@matiassalas44702 жыл бұрын
I have this error... DynamicField.__init__() missing 1 required positional argument: 'field_class' Can Somebody helps me plz !
@matiassalas44702 жыл бұрын
Somebody has this code ??
@ioannp.527411 ай бұрын
django-autocomplete-light still looks as more easier and effective way to achieve the same in Django
@janedoe16732 жыл бұрын
If anyone having trouble making this work even though you followed every step thoroughly, that might be becuase you havent included a script tag for htmx to work. Your welcome!!!
@bbrendon Жыл бұрын
Dynamic Django Forms isn't maintained so probably not a good idea to use it.
@Famelhaut9 ай бұрын
There are 2 packages, dynamic-django-forms and django-forms-dynamic. The package used in the video is django-forms-dynamic, which is maintained and even if it wasn't it's like 10 lines of code. Try the link in the description.