Skip to main content

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

  1. 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'
    

    ]``

  2. Include the GecoAuth URLconf in your project urls.py like this::

    path('gecoauth/', include('gecoauth.urls')),

  3. Add a site id SITE_ID = 1 in settings

  4. Add default authentication and permission classes REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework.authentication.TokenAuthentication', ], 'DEFAULT_PERMISSION_CLASSES': [ 'rest_framework.permissions.IsAuthenticated', ] }

  5. Add the custom serializer REST_AUTH_REGISTER_SERIALIZERS = { 'REGISTER_SERIALIZER': 'gecoauth.serializers.GecoRegisterSerializer', }

  6. Run python manage.py migrate to create the gecoauth models.

  7. 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

gecoauth-0.1.5.tar.gz (5.7 kB view details)

Uploaded Source

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

Hashes for gecoauth-0.1.5.tar.gz
Algorithm Hash digest
SHA256 12b8b568555bf21c45a4dca3c237d22fb035b33c49e3249b02dfbba7e9c8cc15
MD5 d1195a3b28284e73c12b6d48590e78f2
BLAKE2b-256 c958161a6ff99063a1227d2ae40a01a2f241749545c14d3ec23d7a158d59e3ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page