filmov
tv
django-crispy-forms and HTMX integration #3 - Field validation and the hx-swap-oob attribute
Показать описание
This video extends the form built in the previous video, and includes HTMX-driven field validation. We'll see how to use HTMX attributes on Django Form fields, and how to use the hx-swap-oob attribute to disable the form's submit button when we have validation errors.
We'll also see how to make use of a handy function "as_crispy_field()" form django-crispy-forms. This generates the HTML for a particular field on our form, which we can then swap into the DOM after validation, using HTMX.
▶️ Full Playlist:
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:27 Validating username field
01:00 Adding HTMX attributes to username
01:44 Username validation URL and view
03:51 Generating field with as_crispy_field function
07:07 Trigger filters and modifiers
08:31 Adding subject field validation
11:47 Subject validation URL and view
13:18 Disable button with hx-swap-oob
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
#django #python #htmx
We'll also see how to make use of a handy function "as_crispy_field()" form django-crispy-forms. This generates the HTML for a particular field on our form, which we can then swap into the DOM after validation, using HTMX.
▶️ Full Playlist:
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:27 Validating username field
01:00 Adding HTMX attributes to username
01:44 Username validation URL and view
03:51 Generating field with as_crispy_field function
07:07 Trigger filters and modifiers
08:31 Adding subject field validation
11:47 Subject validation URL and view
13:18 Disable button with hx-swap-oob
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
#django #python #htmx
django-crispy-forms and HTMX integration #3 - Field validation and the hx-swap-oob attribute
django-crispy-forms and HTMX integration #2 - User Registration and Login/Logout
Building Django forms with django-crispy-forms
Create a Django form (using HTMX) in 90 seconds 🐎
Django Dynamic Forms Tutorial with Htmx
Django Crispy Forms with Bootstrap 3
Django - Building Form Wizards with formtools and django-crispy-forms
Modal forms with Django+HTMX
Django Crispy Forms Advanced Form Rendering
Django & HTMX - Dynamic Form Creation and Submission
Hyperscript and HTMX - Form Examples with Django
DjangoCon Europe 2023 | Good form: How Django’s form rendering improved during the 4.x series
How To Use Django Crispy Forms
65 - Dynamic New Forms in Django Formset via HTMX - Python & Django 3.2 Tutorial Series
Walking through the DJ4E Crispy Forms (crispy) Sample Code
Динамический Поиск при помощи htmx в Django! 1 часть
Django Crispy form set model field as required
Styling A Form In Django Using Crispy Forms
Hyperscript and HTMX - Creating an Interactive Book Form
Django-Filter - HTMX Integration and Filtering Multiple Values for a Form Field
Neapolitan CRUDView in Django (with django-crispy-forms and TailwindCSS integration)
Dynamic Django forms without writing any JavaScript
4 Django Crispy Forms
How to use Django Forms
Комментарии