django-dnt

Make Django requests aware of the DNT header.


Keywords
django-dnt, dnt, do, not, track
License
BSD-3-Clause
Install
pip install django-dnt==1.0

Documentation

Django-DNT

The status of Travis continuous integration tests The code coverage The PyPI package

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.