Skip to main content

django utils for eit

Project description

Convenient utils for EIT Django dev

Documentation

Quickstart

Install EIT Django Utils:

pip install eit_django_utils

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django-hijack',
    'eit_django_utils',
    ...
)

Add EIT Django Utils’s URL patterns:

from eit_django_utils import urls as eit_django_utils_urls


urlpatterns = [
    ...
    path("eit_utils/", include(eit_django_utils_urls, namespace="eit_django_utils")),
    ...
]

Using with Django 2.2+ settings.py:

MIDDLEWARE = [
  ...
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  # SetLocalDevShibUID is only for local development!
  'eit_django_utils.backends.custom_auth.SetLocalDevShibUID',
  'eit_django_utils.backends.custom_auth.CustomHijackMiddleware',
  'eit_django_utils.backends.custom_auth.ShibAffiliationRequiredMiddleware',
  'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  ...
]

AUTHENTICATION_BACKENDS = (
'eit_django_utils.backends.custom_auth.CustomRemoteUserBackend',
)

LOCALDEV_SHIB_UID = 'desired_unity_id'

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

eit_django_utils-0.4.4.tar.gz (13.1 kB view hashes)

Uploaded Source

Built Distribution

eit_django_utils-0.4.4-py3-none-any.whl (11.2 kB view hashes)

Uploaded Python 3

Supported by

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