May 2018
Beginner to intermediate
526 pages
11h 57m
English
We will start this section by using the Django authentication framework to allow users to log in to our website. Our view should perform the following actions to log in a user:
First, we will create a login form. Create a new forms.py file in your account application directory and add the following lines to it:
from django import formsclass LoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput)
This form will be used to authenticate users against the database. ...
Read now
Unlock full access