This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Django utilities for honoring the Do Not Track HTTP header.

Mathieu Leplatre posted an article Django: Do not forget Do Not Track. I really appreciated the post, and wanted to implement the ideas in my projects. Being lazy, I only wanted to do the work once, so I took his ideas and packaged them up with some tests and docs.

Included is middleware for detecting HTTP_DNT and passing its information on to both views and templates via the request object, and a useful context processor. The middleware also adds a vary header for cache control.

This package requires Python 2.7 or newer and Django 1.4 or later.

Refer to the documentation for complete information.


Installation of the middleware is required. The context processor is convenient and thus recommended.


    # default/other processors ...
    # default/other processors ...

    # default/other processors ...

Then in your template you can do things like:

{% if not donottrack %}
    {% include "google-analyitcs.html" %}
{% endif %}

And your views can also handle DNT:

def my_view(request):
    if not request.donottrack:
        # Log some request data ...

    # continue with view logic


Adding this app to your INSTALLED_APPS is currently unnecessary unless you want to run tests.

Other Information


Installing this app in your Django project does not mean that you honor Do Not Track any more than installing django-secure means your web applicaiton is secure. It only means you have some tools to help with that end goal. You will need to audit your full stack to ensure that you are honoring DNT. But this app is a great start, and we hope you find it useful.


This is an initial release. Despite being simple and theoretically solid (it has a full test suite) this is a beta-type release, and the public API may change, and as I learn more about DNT, more functionality may be added.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-donottrack-0.1.tar.gz (12.1 kB) Copy SHA256 Checksum SHA256 Source Mar 12, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting