filmov
tv
django-crispy-forms and HTMX integration #2 - User Registration and Login/Logout
Показать описание
This video extends the basic crispy-forms setup from the previous video, and gives users the ability to register and login/logout to our Django application.
We create a User model to persist users to the database, then attach some HTMX attributes to the form in order to perform actions without refreshing our page.
When registering, users are automatically logged-in and sent to a profile page. Logging out will redirect back to our Django form.
We will demonstrate a new HTMX concept in this video - use of the "Hx-Push" HTTP header to instruct the client to push a new URL to the browser history.
▶️ Full Playlist:
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:32 Creating User model that extends AbstractUser
04:28 Converting form to ModelForm
07:58 Handling form POST request in View
10:39 Adding form field validation method
13:02 Updating form to use HTMX
19:22 Handling successful form submission
20:56 Updating URL with hx-push-url
21:58 Adding Logout functionality with HTMX
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
#django #python #htmx
We create a User model to persist users to the database, then attach some HTMX attributes to the form in order to perform actions without refreshing our page.
When registering, users are automatically logged-in and sent to a profile page. Logging out will redirect back to our Django form.
We will demonstrate a new HTMX concept in this video - use of the "Hx-Push" HTTP header to instruct the client to push a new URL to the browser history.
▶️ Full Playlist:
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:32 Creating User model that extends AbstractUser
04:28 Converting form to ModelForm
07:58 Handling form POST request in View
10:39 Adding form field validation method
13:02 Updating form to use HTMX
19:22 Handling successful form submission
20:56 Updating URL with hx-push-url
21:58 Adding Logout functionality with HTMX
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
#django #python #htmx
django-crispy-forms and HTMX integration #2 - User Registration and Login/Logout
django-crispy-forms and HTMX integration #3 - Field validation and the hx-swap-oob attribute
Building Django forms with django-crispy-forms
django-crispy-forms & ModelChoiceFields / Select2 Integration for Searchable Form Fields
Django Dynamic Forms Tutorial with Htmx
Create a Django form (using HTMX) in 90 seconds 🐎
Django - Building Form Wizards with formtools and django-crispy-forms
Django Crispy Forms Advanced Form Rendering
Django & HTMX - Dynamic Form Creation and Submission
How To Use Django Crispy Forms
Динамический Поиск при помощи htmx в Django! 1 часть
Modal forms with Django+HTMX
#2 Django Crispy Forms|How to validate Crispy forms through Ajax without reloading the complete page
4 Ways Of Form Handling In Django
Walking through the DJ4E Crispy Forms (crispy) Sample Code
Django : alternative to django-crispy-forms
Neapolitan CRUDView in Django (with django-crispy-forms and TailwindCSS integration)
Hyperscript and HTMX - Form Examples with Django
Hyperscript and HTMX - Creating an Interactive Book Form
Styling A Form In Django Using Crispy Forms
Dynamic Django forms without writing any JavaScript
DjangoCon Europe 2023 | Good form: How Django’s form rendering improved during the 4.x series
TailwindCSS and Django-Crispy-Forms - Template Pack for Django Forms!
4 Django Crispy Forms
Комментарии