Django & HTMX - django-template-partials for Template Partial Responses

Описание к видео Django & HTMX - django-template-partials for Template Partial Responses

Blog Post: https://bugbytes.io/posts/rendering-t...
Starter Code: https://github.com/bugbytes-io/templa...

In this video, we look at the new django-template-partials library, developed by Carlton Gibson. This library gives us an easy way to define and reference partial templates (template fragments) in our Django template code, and then return these partials as a response to an HTMX (or other) request.

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
03:13 Creating the Django template
05:39 Submitting form with HTMX
10:31 Returning template fragment with django-template-partials
17:00 Clearing form fields after HTMX request with form.reset() function

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes

▶️ Full Playlist:
   • Django & HTMX  

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/rendering-t...
👾 Github: https://github.com/bugbytes-io/templa...
🐦 Twitter:   / bugbytesio  

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Starter Code: https://github.com/bugbytes-io/templa...
django-template-partials: https://github.com/carltongibson/djan...
Carlton Gibson DjangoCon talk:    • DjangoCon Europe 2023 | Yak-shaving t...  
Adding CSRF Token to POST request: https://django-htmx.readthedocs.io/en...

#python #django #webdevelopment #htmx

Комментарии

Информация по комментариям в разработке