Skip to main content

No project description provided

Project description

pmd-django

dev

Provides the Django management command python manage.py dev

auth middleware

To use the auth middleware:

  1. List pmd_django in the INSTALLED_APPS in settings.py
INSTALLED_APPS = [
    "pmd_django",
    ...
]
  1. List pmd_django.auth.api_key_middleware in the MIDDLEWARE just underneath django.contrib.auth.middleware.AuthenticationMiddleware
MIDDLEWARE = [
    "django.middleware.security.SecurityMiddleware",
    "whitenoise.middleware.WhiteNoiseMiddleware",
    "django.contrib.sessions.middleware.SessionMiddleware",
    "corsheaders.middleware.CorsMiddleware",
    "django.middleware.common.CommonMiddleware",
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "pmd_django.auth.api_key_middleware",
    "django.contrib.messages.middleware.MessageMiddleware",
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
]
  1. Optionally add USER_API_KEY = env.str("USER_API_KEY") to settings.py
  2. Optionally add USER_AUTH_FILTERS to settings.py. This should be a list of functions that will get passed a request object. The function should return true if the middleware should authorize the request.

Testing

Run python manage.py test from the root of the project to run the tests.

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

pmd_django-2.0.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

pmd_django-2.0.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file pmd_django-2.0.2.tar.gz.

File metadata

  • Download URL: pmd_django-2.0.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pmd_django-2.0.2.tar.gz
Algorithm Hash digest
SHA256 aafa7a7e6454c4cdfd8b0cd8af9a6e890c7a3212acc2b9824d9677b96939a096
MD5 3466278d15cc7d44f21a1b8fc8fd97a5
BLAKE2b-256 005ec3aff561d1aca40922c6463261684a67ecc6ee7bd2a015b3587e6fa2a977

See more details on using hashes here.

Provenance

The following attestation bundles were made for pmd_django-2.0.2.tar.gz:

Publisher: publish.yml on TechServ-Consulting-Training-Ltd/pmd-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pmd_django-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: pmd_django-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pmd_django-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6ce99dde6a1dc5575e9a30b62cd4f70a405d5686e079b66b8830328dfa16aa55
MD5 48492410f5bf3dd2ec299e59bfafda4a
BLAKE2b-256 2ac9a0524e8c256f03057e5db8a3802fc02255c41234361379136683a7260cba

See more details on using hashes here.

Provenance

The following attestation bundles were made for pmd_django-2.0.2-py3-none-any.whl:

Publisher: publish.yml on TechServ-Consulting-Training-Ltd/pmd-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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