Django auth by default requires form to be submitted to login and signup URLs. This does not work if we need to have the login signup from a popup/Modal as the errors need to be shown without being redirected. Hence, loogin signup has been implemented on a bootstrap modal using AJAX.
Django auth by default supports login and signup using username as primary key field. The User class has been overridden to support login and signup using E-mail ID as primary key.
- Copy the following lines to your settings.py file
LOGIN_REDIRECT_URL = '/'
AUTH_USER_MODEL = 'registration.User'
- Copy registration app to your project.
- Change the location of templates as required.
python manage.py makemigrations registration
python manage.py migrate