https://github.com/dcramer/django-cookies
Drop in replacement for request.COOKIES in Django
https://github.com/dcramer/django-cookies
Last synced: 11 months ago
JSON representation
Drop in replacement for request.COOKIES in Django
- Host: GitHub
- URL: https://github.com/dcramer/django-cookies
- Owner: dcramer
- Created: 2010-02-17T04:12:25.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2010-02-17T05:36:34.000Z (over 16 years ago)
- Last Synced: 2025-08-06T17:03:31.445Z (11 months ago)
- Language: Python
- Homepage:
- Size: 204 KB
- Stars: 13
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
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