A Django app to rest framework custom user registration and authentication.
Project description
Django rest framework custom user authentication package
Quick start
Add “app” in your INSTALLED_APPS settings like this:
INSTALLED_APPS = [ ... 'dj_swift_auth', 'rest_framework', 'rest_framework.authtoken', ]
- Include the app URLconf in your project urls.py like this::
path(‘user/’, include(‘dj_swift_auth.urls’)),
- settings.py file add your use model::
AUTH_USER_MODEL = ‘dj_swift_auth.User’
- Drop current database and delete all migrations file from your application then again run migration in the app::
python manage.py makemigrations dj_swift_auth
python manage.py migrate dj_swift_auth
python manage.py migrate
API endpoint:
Registration: user/api/register/
Login: user/api/login/
Profile: user/api/profile/
Profile Update: user/api/profile/1/
Change Password: user/api/change-password/1/ # Pass the user ID
Logout: user/api/logout/
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-swift-auth-1.0.tar.gz
(7.0 kB
view hashes)
Built Distribution
Close
Hashes for django_swift_auth-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5fd81b185d0a8c1012a0a7fec7620ae5eb3a1a539e1c18a5942012e7baeafff |
|
MD5 | 4c7ae13966eb8056b16fb36f53ae190a |
|
BLAKE2b-256 | b324608208fe0ab9e810f7ee723ca7b1c4be8678ca709c587266eb30c9e55951 |