Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!


Project Description

A simple middleware that uses the django messages framework to add a notification regarding the EU cookie directive.

If it can’t detect a cookie about cookies, sets it and displays a message.


Install from pypi.

pip install django-cookie-message

In your settings:

* Ensure the django messages framework is installed.
* Add ``'cookie_message'`` to ``INSTALLED_APPS``.
* Add ``'cookie_message.middleware.CookieMessageMiddleware'`` to ``MIDDLEWARE_CLASSES``.


The message can be changed by overriding the cookies/ template.

The cookie can be changed by defining COOKIE_MESSAGE_KWARGS in your The default is:

    'key': 'cookie_message',
    'value': '',
    'max_age': 365 * 24 * 60 * 60, # One year.
    'expires': None,
    'path': '/',
    'domain': None,
    'secure': None,
    'httponly': False,

These are the arguments sent to set_cookie().

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(2.3 kB) Copy SHA256 Hash SHA256
Source None Nov 15, 2012

Supported By

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 Google Google Cloud Servers