1. Getlogic
  2. Untitled project
  3. lib_django_cookie_law


lib_django_cookie_law /

Filename Size Date modified Message
235 B
611 B
1.6 KB
41 B
850 B
1.7 KB

Django cookie law

This is a Django application that makes it easy to implement cookies compliant with Dutch law, as far as I am able to tell. I'm not a lawyer, so use at your own risk.


If you're updating from 0.1.4 to 0.1.5 take note that the CookieBar model has changed, you should run the South migrations.


  • jQuery


  • Add the cookie_law app to your INSTALLED_APPS.
  • Add 'url(r'^cookies/', include('cookie_law.urls')),' to your main urls.py, without the ''.
  • Run the cookie_law migrations or syncdb if you don't use South.
  • Load the cookie_bar template tags and include {% show_cookie_bar %} under the <body> tag in your base template.
  • Make a cookie bar in the admin.
  • Surround your cookies with {% if request.COOKIES.allow_cookies == '1' %} <cookie> {% endif %}