A django user authentication and login application.
Project description
Authentication
A django user authentication and login application.
01. To install and use the package, use:
pip install django-user-login
Instructions
02. Add "authentication" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'authentication',
]
03. Include the authentication URLconf in your project urls.py like this:
path('authentication/', include('authentication.urls')),
04. Run python manage.py migrate
to create the User
model (you'll need the Admin app enabled).
05. The App requires Django Sessions
06. In your settings.py file include the following:
SITE_TITLE = 'site-title' # title of your site
LOGIN_URL = '/authentication/'
EMAIL_HOST = 'email-host' # e.g. 'smtp-mail.outlook.com'
EMAIL_PORT = email-port # e.g. 587
EMAIL_HOST_USER = 'email-address'
EMAIL_HOST_PASSWORD = 'email password'
EMAIL_USE_TLS = True
AUTHENTICATION_DEBUG = Boolean # True or False (use False in production)
VERIFICATION_CODE_VALIDITY_IN_MINUTES = Integer # range of [1, 60] only
07. For login and logout functionality, use -
-
To Login, use anyone one of these
- <a href="{% url 'authentication:login' %}">Login</a> - <a href='/authentication/'>Login</a>
-
To Logout, use anyone one of these
- <a href="{% url 'authentication:logout' %}">Logout</a> - <a href="/authentication/logout/">Logout</a>
-
To visit My Account page and edit profile credentials, use any one of these -
- <a href="{% url 'authentication:account' %}">Account</a> - <a href="/authentication/account/">Account</a>
08. When AUTHENTICATION_DEBUG = TRUE
- Live EMAILS will not be sent and verification codes / messages, if any, will be displayed in the terminal.
09. When a user closes their account, the app will not delete the User
but set is_active
to False
(see: User Model) and set_unusable_password()
(see: Methods).
10. Check Demo Website
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-user-login-0.3.4.tar.gz
(20.1 kB
view details)
Built Distribution
File details
Details for the file django-user-login-0.3.4.tar.gz
.
File metadata
- Download URL: django-user-login-0.3.4.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31b958574742c50883c8556456e01b3cb3a51b6356a811b78c81abdcc0f02bab |
|
MD5 | c3f99ae57b6a931c879bc3c656b82853 |
|
BLAKE2b-256 | a11206d1ecbcb002b2f7023745b4487c68e325d1f8e0150d61c87383d5a0d561 |
File details
Details for the file django_user_login-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: django_user_login-0.3.4-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f12f8d096e3910507568aaa40b12466514b8e389f7b32678768ed5405cd27cbb |
|
MD5 | 9c8960ef37675c7608efef2abf95b016 |
|
BLAKE2b-256 | 9da324a9fd32c6c82383c5b60e02beb06253730ef2014c0eae0dc2e72304f7a2 |