Literally just rewatching this and realised its the video that got me back into Django after a few years not touching web dev work. Thanks for the clear and always useful channel.
I think this is really the best way to render partials with django-htmx. Thank you so much for all the videos you make, your tutorials make me a much more skillful developer!
great video's as always. If I may give one suggestion. When working with forms + htmx + swapping it would always be nice to show how to give back a form for validation on errors, how to swap ooob and how to manage all those nity little triggers for behavior
Amazing tutorial, very easy to follow and understand how all the pieces come together. Would love to see a tutorial on setting up Django with SvelteKit and using them together. Keep up the amazing work!
Thanks for the tutorial, very informative. One small thing though; the blog post is still using the afterSwap event in the script that is used to clear the form.
More beautiful tutorials. I've not used this or the other block/partial packages so this was new for me. Could you not have used the hx-on::after-request="form.reset()" have been a faster way to clear the form?
Out of curiosity - how does this work if there are errors in the form? Does the `.reset()` method clear out what the user has entered even if there are errors?
I came here to ask the same question! 😀 Seems to me that the reset needs to take place if the film list gets appended to (i.e., the form submission was valid).
Thank you so much for this video, you always have the best content, one question, for some reason i cant clear a Summernote form after positing, i tried a lot of method including the htmx one but nothing is working, any help would be appreciated
The button :active state stays in the same state after form.reset()… How would it look like (with AlpineJS) the form reset and the buttton normal state when form submitted?
This is opinionated - I personally like being able to render the partial directly in the Django view, using the "render()" method. With render_block, you have to call a separate method to get your HTML, called "render_block_to_string()"
It's possible but probably not with django-template-partials. You might wanna look at this package called "jinja2-fragments" to achieve the same thing with Flask: github.com/sponsfreixes/jinja2-fragments
Literally just rewatching this and realised its the video that got me back into Django after a few years not touching web dev work. Thanks for the clear and always useful channel.
Ah, that's amazing to hear that it helped you get back into Django! Thanks a lot for sharing Don!
I can't express enough how simple it is to integrate with existing projects. Other alternatives in comparison just makes me cry.
Yeah, it has been very nice to use for me so far.
I think this is really the best way to render partials with django-htmx. Thank you so much for all the videos you make, your tutorials make me a much more skillful developer!
That's amazing to hear, thanks a lot!
great video's as always. If I may give one suggestion. When working with forms + htmx + swapping it would always be nice to show how to give back a form for validation on errors, how to swap ooob and how to manage all those nity little triggers for behavior
This makes htmx easier with django, mostly when rendering ! Thank you mate !
Thanks for commenting mate - and yes, agreed!
Amazing tutorial, very easy to follow and understand how all the pieces come together. Would love to see a tutorial on setting up Django with SvelteKit and using them together.
Keep up the amazing work!
Thank you - I have something ready to record with SvelteKit + Django. It's a long one though, need to get it done soon and stop putting it off! :D
Amazing. You always make video that i'm looking for.
Thanks a lot!
Django+htmx is cool! Thanks for the great video!
Agreed! And thanks for watching!
Awesome stuff and perfect timing once again. Much cleaner than render-block.
Thanks a lot Rob 🙏
Very interesting approach to exchange - well - partials of a page! Well presented, thanks for this! Nice
Thanks a lot!
I learn a lot about htmx thanks to you. 👍
Glad to hear that, thanks for the comment!
Thanks for the tutorial, very informative. One small thing though; the blog post is still using the afterSwap event in the script that is used to clear the form.
Thank you for pointing that out! I'll get that changed.
More beautiful tutorials. I've not used this or the other block/partial packages so this was new for me. Could you not have used the hx-on::after-request="form.reset()" have been a faster way to clear the form?
Thank you!
Ah -- very good idea! Missed that one when preparing the video.
Very handy, thanks for the clear video once again
you're so so helpful!!
Thanks a lot!
Thanks one more time for the great tutorial!
Thanks a lot!
Cool video as always, thanks,you taught me all I know about htmx.
Thank you!
super helpful content as always!
Thanks a lot!
Лучший!
Спасибо!
Out of curiosity - how does this work if there are errors in the form? Does the `.reset()` method clear out what the user has entered even if there are errors?
I came here to ask the same question! 😀 Seems to me that the reset needs to take place if the film list gets appended to (i.e., the form submission was valid).
Thank you so much for this video, you always have the best content, one question, for some reason i cant clear a Summernote form after positing, i tried a lot of method including the htmx one but nothing is working, any help would be appreciated
Nice!
Thank you!
Thank you so much
Thanks for watching!
The button :active state stays in the same state after form.reset()… How would it look like (with AlpineJS) the form reset and the buttton normal state when form submitted?
can you make a full tutorial on django channels and htmx?
Hello, I have a question please, can we return more than one partial using the render function ?
Can you nest partials?
thank you
You're welcome, thank you for watching!
Can you show us how to do a image search using django? If you search cat it will show images with cat
How is it better or different from django-render-blocks?
This is opinionated - I personally like being able to render the partial directly in the Django view, using the "render()" method. With render_block, you have to call a separate method to get your HTML, called "render_block_to_string()"
i came from node js, i want to ask is it possible to do this in flask?. I think flask is lighter than django. Thankyou
It's possible but probably not with django-template-partials. You might wanna look at this package called "jinja2-fragments" to achieve the same thing with Flask:
github.com/sponsfreixes/jinja2-fragments
@@bugbytes3923 thanks to youu