Project description
Django Cookie Filter
Django middleware which removes all unwanted cookies - useful
for improving cache hit ratios when analytics cookies interfere with caching.
Installation
Using pip :
$ pip install django-cookiefilter
Edit your Django project's settings module, and add the middleware to the start of MIDDLEWARE:
MIDDLEWARE = [
"cookiefilter.middleware.CookieFilterMiddleware" ,
# ...
]
[!NOTE]
The middleware should be added before UpdateCacheMiddleware, as it uses the value of
HTTP_COOKIES which needs to be modified.
Configuration
Out of the box the standard Django cookie names will work without any other configuration. However
if your project uses different or additional cookie names, edit COOKIEFILTER_ALLOWED in your
project's settings module:
COOKIEFILTER_ALLOWED = [
"analytics" ,
"csrftoken" ,
"django_language" ,
"messages" ,
"sessionid" ,
]
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages .
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names .
The dropdown lists show the available interpreters, ABIs, and platforms.
Enable javascript to be able to filter the list of wheel files.
Copy a direct link to the current filters
Copy
File name
Interpreter
Interpreter
py3
ABI
ABI
none
Platform
Platform
any
File details
Details for the file django_cookiefilter-1.1.tar.gz.
File metadata
Download URL: django_cookiefilter-1.1.tar.gz
Upload date:
Apr 13, 2025
Size: 4.5 kB
Tags: Source
Uploaded using Trusted Publishing? Yes
Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Hashes for django_cookiefilter-1.1.tar.gz
Algorithm
Hash digest
SHA256
5687e6b9839a5829a36d8bc54be2d8334867a986b0bb7ede8ad421964f350483
Copy
MD5
29d656487948ab13dce4e82435df7c38
Copy
BLAKE2b-256
8543d44f15aedfe9bb98e0812a9fc8a496e252b485143b8da8b8df6c53343d87
Copy
See more details on using hashes here.
Provenance
The following attestation bundles were made for django_cookiefilter-1.1.tar.gz:
File details
Details for the file django_cookiefilter-1.1-py3-none-any.whl.
File metadata
File hashes
Hashes for django_cookiefilter-1.1-py3-none-any.whl
Algorithm
Hash digest
SHA256
855d2b6d5e8f670616bad4be9101ac2ed62d540b420676289af6aed9cd4c1b84
Copy
MD5
ee9f66e3b82e60c1a3ee7044f85d09e8
Copy
BLAKE2b-256
7c9739e1818c4007989c8895a443795ce28e3c1ef5e097f798208ad534445f9e
Copy
See more details on using hashes here.
Provenance
The following attestation bundles were made for django_cookiefilter-1.1-py3-none-any.whl: