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.1.tar.gz (10.9 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.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pmd_django-2.0.1.tar.gz
  • Upload date:
  • Size: 10.9 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.1.tar.gz
Algorithm Hash digest
SHA256 870dd3b5ebdc0c73578ec01dd4ae2b9b103e54ee4f0e95f7636cd268c47dbad4
MD5 739300bd547617da16424adfb3b2c13b
BLAKE2b-256 eb4dfc416a87785b5cd8c0183b0750b40c83648ba611e916f37189706c5e1fcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pmd_django-2.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: pmd_django-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46c3a10bc0654f1a84006770ad5a5d0a9bf8cbbf160355b7da15fe1c8c72b010
MD5 f10b5efdf125531a716293c1cdbefa99
BLAKE2b-256 8984c1089b8cfb4027bcba2ded79eec5f84273e38745f0a831d04c68068a1447

See more details on using hashes here.

Provenance

The following attestation bundles were made for pmd_django-2.0.1-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