Skip to main content

django-cookie-control

A Django plugin to integrate the Civic UK Cookie Control (https://www.civicuk.com/cookie-control)

The plugin is compatible with Django, DjangoCMS and Django/CMS multisite.

To install

Install the application via pip:

pip install django-cookie-control

Add 'django_cookie_control' to installed apps:

INSTALLED_APPS = [ ... 'django_cookie_control', ...]

Add/Edit the following to settings.py if required with required cookies:

# DEFAULT if missing:
COOKIE_CONTROL_REQUIRED_COOKIES = ['csrftoken','django_language','sessionid','django_privacy_mgmt_preferences','AWSALB']

Run or make migrations:

python.exe manage.py migrate

To configure

For a full list of configuration settings see the Civic UK site, here:

https://www.civicuk.com/cookie-control/v8/documentation

Plugin configuration overview:

  1. Add a new configuration - custom configuration for different sites via multisite.

  1. Configure Main Settings
  • Site name
  • API key
  • Cookie Control product version: Community, Pro, Pro Multisite

  1. Display Options
  • Position
  • Theme style
  • Toggle type
  • Close style

  1. Text and Accessibility

  1. Custom Settings

  1. Pro and Pro_Multisite Settings A series of settings for the paid Pro plugins, including:
  • Custom text
  • Custom formatting

  1. Cookies
  • Necessary Cookies
    • A simple list of cookie names, including wildcards that are necessary for the site
    • A default list for Django, DjangoCMS, and AWS are already included.
  • Optional Cookies
    • Add an optional cookie or package of cookies that can be turned off for the site
    • Using separate functions On Accept or for On Revoke the cookies can be customised to be disable or enabled.

To Test

Use IE11's emulation to test this tool -

Metadata

Release files for django-cookie-control 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-cookie-control 1.1.0
File Size Uploaded Provenance Actions
django_cookie_control-1.1.0.tar.gz 25.3 kB Without provenance Details for django_cookie_control-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-cookie-control 1.1.0
File Interpreter ABI Platform Actions
django_cookie_control-1.1.0-py3-none-any.whl Python 3 none any Details for django_cookie_control-1.1.0-py3-none-any.whl

Total release size: 54.1 kB

Security for django-cookie-control 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page