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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file eit_django_utils-0.4.4.tar.gz.

File metadata

  • Download URL: eit_django_utils-0.4.4.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for eit_django_utils-0.4.4.tar.gz
Algorithm Hash digest
SHA256 3aff54c1f021c98d0922b2dc04629d3c3303e18f0f8e9b1cc3bd58b814a9fd2d
MD5 7896acfc2633bb0726157397867d0c9f
BLAKE2b-256 de099459b3aaf25eb7a6827a2bed04543db3512309ea8e51dff8d8d54e61ae64

See more details on using hashes here.

File details

Details for the file eit_django_utils-0.4.4-py3-none-any.whl.

File metadata

File hashes

Hashes for eit_django_utils-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c6aa16ed886396bec85745b781305fe2befce1cdfcc9b96f56bcabeb80d53938
MD5 39040597e3d74225ef4f9d631a9bfdc0
BLAKE2b-256 2bb9e4c85086fa90da928a95fe11d73dc4e7d32fe8dc70f80d79036a32a495d6

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