Skip to main content

Make Django requests aware of the DNT header.

Project description

django-dnt offers an easy way to pay attention to the DNT (Do Not Track) HTTP header. If users are sending DNT: 1, DoNotTrackMiddleware will set request.DNT = True, else it will set request.DNT = False.

Just add dnt.middleware.DoNotTrackMiddleware to your MIDDLEWARE_CLASSES (Django 1.9 and earlier) or MIDDLEWARE (Django 1.10 and later) and you’re good to go.

Release History

v1.0 - 2020-08-12

  • No new features, but marking the project as mature since neither DNT or this implementation is likely to change, except to follow Django releases.

  • Add support for Django 2.0, 2.1, and 2.2

  • Add support for Python 3.7

v0.2.0 - 2017-02-17

  • Supported Django versions: 1.8, 1.9, 1.10, and 1.11

  • Supported Python versions: 2.7, 3.3, 3.4. 3.5, 3.6

  • Add “DNT” to Vary header in response (eillarra)

v0.1.0 - 2011-02-16

  • Initial Release

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

django-dnt-1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

django_dnt-1.0-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-dnt-1.0.tar.gz.

File metadata

  • Download URL: django-dnt-1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.10

File hashes

Hashes for django-dnt-1.0.tar.gz
Algorithm Hash digest
SHA256 ef10c6985bab8e95fa95090b857feb3ecf28080e7c8ef158ba771a0ddbc43f8a
MD5 8d03d03f9aa87288b4c7fc81a53f326d
BLAKE2b-256 8a608034903697fed26f803d6a8f9d097bb23ee3230f34b8be3acd21c667731e

See more details on using hashes here.

File details

Details for the file django_dnt-1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_dnt-1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.10

File hashes

Hashes for django_dnt-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5932a67189e3129c0b26e42fd7afe691e01ebeee7bb801bb913e70c377f8e447
MD5 e4667652f6a86dd7d619dae7e8e77251
BLAKE2b-256 255b58d78391aa51c917377900addef8f2057650049253823e93040a883724d1

See more details on using hashes here.

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