Django django-registration automated registration

created at 07-17-2021 views: 2

Install django-registration

pip install django-registration

note:

django-registration will use Django's original auth, so it is necessary to ensure that there is no problem with the part of auth user authentication.

Parameters set by setttings.py:

ACCOUNT_ACTIVATION_DAYS = 7

This parameter represents the account activation time is 7 days

urls.py

url(r'^account', include("registration.backends.hmac.urls"))

Templates and text files required by django-registration

Note: All templates and text files must be placed in the registration folder under the templates directory. All required templates and text files are shown in the table:

Template or file name description of purpose
registration_form.html the web page that displays the registration form
registration_complete.html the information page displayed after completing the registration form and clicking the "Submit" button
activation_complete.html the page that will be displayed when the account is successfully activated
activation_email.txt the email content used when sending activation emails
activation_email_subject.txt the email subject used when sending activation emails
Please log in to leave a comment.