Skip to main content

Reusable Django app for Penn Labs accounts

Project description


  • Python 3.4+
  • Django 2.0+


Install with pipenv
pipenv install django-labs-accounts

Add accounts to INSTALLED_APPS


Add the following to

urlpatterns = [
    path('accounts/', include('accounts.urls', namespace='accounts'))


All settings are handled with a PLATFORM_ACCOUNTS dictionary.


    'CLIENT_ID': 'id',
    'CLIENT_SECRET': 'secret',
    'REDIRECT_URI': 'example',
    'ADMIN_PERMISSION': 'example_admin'

The available settings are:

CLIENT_ID the client ID to connect to platform with. Defaults to LABS_CLIENT_ID environment variable.

CLIENT_SECRET the client secret to connect to platform with. Defaults to LABS_CLIENT_SECRET environment variable.

REDIRECT_URI the redirect uri to send to platform. Defaults to LABS_REDIRECT_URI environment variable.

SCOPE the scope for this applications tokens. Must include introspection. Defaults to ['read', 'introspection'].

PLATFORM_URL URL of platform server to connect to. Should be https://platform(-dev) (no trailing slash)

ADMIN_PERMISSION The name of the permission on platform to grant admin access. Defaults to example_admin





Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_labs_accounts-0.3.2-py3-none-any.whl (5.7 kB) Copy SHA256 hash SHA256 Wheel py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page