Skip to content
Drop in replacement for request.COOKIES in Django
Python
Latest commit 9173ac0 Feb 16, 2010 David Cramer incr version
Failed to load latest commit information.
djcookies incr version Feb 16, 2010
.gitignore Initial commit Feb 16, 2010
README.rst We only need one middleware because of ordering Feb 16, 2010
setup.py Initial commit Feb 17, 2010

README.rst

A two-part middleware which modifies request.COOKIES and adds a set and delete method.

  • set matches django.http.HttpResponse.set_cookie
  • delete matches django.http.HttpResponse.delete_cookie

Installation

Just modify your MIDDLEWARE_CLASSES setting, order is important here!

:
MIDDLEWARE_CLASSES = (
'djcookies.CookieMiddleware', ...

)

Usage

def my_view(request):
request.COOKIES.set([args]) ... return response
Something went wrong with that request. Please try again.