A personal Django app that extends django-rest-auth.
Project description
===== gecoauth
gecoauth is a Django app that extends django-rest-auth, providing the same endpoints but also adding some models and new functionality. Detailed documentation is in the "docs" directory.
Quick start
-
Add "gecoauth" to your INSTALLED_APPS setting like this::
``INSTALLED_APPS = [
'gecoauth', 'rest_framework', 'rest_framework.authtoken', # token auth django rest 'rest_auth', # django-rest-auth 'django.contrib.sites', 'allauth', 'allauth.account', 'rest_auth.registration']``
-
Include the GecoAuth URLconf in your project urls.py like this::
path('gecoauth/', include('gecoauth.urls')), -
Add a site id
SITE_ID = 1in settings -
Add default authentication and permission classes
REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework.authentication.TokenAuthentication', ], 'DEFAULT_PERMISSION_CLASSES': [ 'rest_framework.permissions.IsAuthenticated', ] } -
Add the custom serializer
REST_AUTH_REGISTER_SERIALIZERS = { 'REGISTER_SERIALIZER': 'gecoauth.serializers.GecoRegisterSerializer', } -
Run
python manage.py migrateto create the gecoauth models. -
Start the development server and visit http://127.0.0.1:8000/gecoauth/rest-auth and http://127.0.0.1:8000/gecoauth/rest-auth-registration to use the app (see django-rest-auth for the real endpoints)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file gecoauth-0.1.5.tar.gz.
File metadata
- Download URL: gecoauth-0.1.5.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12b8b568555bf21c45a4dca3c237d22fb035b33c49e3249b02dfbba7e9c8cc15
|
|
| MD5 |
d1195a3b28284e73c12b6d48590e78f2
|
|
| BLAKE2b-256 |
c958161a6ff99063a1227d2ae40a01a2f241749545c14d3ec23d7a158d59e3ad
|