Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Drop in replacement for request.COOKIES in Django

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 djcookies
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
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.