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.
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
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
18:41 Creating template
19:22 Handling successful form submission
20:56 Updating URL with hx-push-url
21:58 Adding Logout functionality with HTMX
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support th
3 views
12
2
2 years ago 00:22:10 1
Видео от Python: с нуля до гуру
3 years ago 00:28:03 3
django-crispy-forms and HTMX integration #2 - User Registration and Login/Logout
3 years ago 01:45:52 21
#4 Система профилей, регистрации и авторизации - Интернет магазин на Python [Django]
3 years ago 00:07:17 6
43. Django 4. Обзор уроков. Применение CreateView + django-crispy-form, пишем форму создания записи.
3 years ago 00:03:59 1
8. Если хотим на сайте Django4 красивые формы. ставим django-crispy-forms.
3 years ago 01:11:54 6
Complete Django CRUD Operations
5 years ago 00:45:56 1
Python Django Tutorial: Full-Featured Web App Part 6 - User Registration
6 years ago 00:25:25 2
Django Turorial - User Registration & Sign Up Page
9 years ago 00:16:15 7
Try Django 1.8 Tutorial - 21 of 42 - Third Party Library: Django Crispy Forms - Learn Django