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.2.tar.gz.
File metadata
Download URL: django_cookiefilter-1.2.tar.gz
Upload date:
Mar 27, 2026
Size: 4.5 kB
Tags: Source
Uploaded using Trusted Publishing? Yes
Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
Hashes for django_cookiefilter-1.2.tar.gz
Algorithm
Hash digest
SHA256
6cb15bfed937cd4e82c75385b8e84a043b4bfef3a85a1158d7ec5f487fb3f912
Copy
MD5
a31715c2de8af977ede9f06c82dd5734
Copy
BLAKE2b-256
ba9ab92c9dd2d3d3606802d62b75a3b69287dfbcce9924a8f66a2999c8bd9953
Copy
See more details on using hashes here.
Provenance
The following attestation bundles were made for django_cookiefilter-1.2.tar.gz:
File details
Details for the file django_cookiefilter-1.2-py3-none-any.whl.
File metadata
File hashes
Hashes for django_cookiefilter-1.2-py3-none-any.whl
Algorithm
Hash digest
SHA256
3cc3e83c336569d49859f1060f030c0a717f1a42723e2c7c18f320d2827ae95a
Copy
MD5
8cbb90bff8eb978a9eaae3828d4c53af
Copy
BLAKE2b-256
466bdc7b60c7a099d51fd6a8afc51e936e6e6db39010c3ee3896dfffe838ee9f
Copy
See more details on using hashes here.
Provenance
The following attestation bundles were made for django_cookiefilter-1.2-py3-none-any.whl: