{"id":44744,"library":"django-cookie-consent","title":"Django Cookie Consent","description":"Django application for managing cookie consent, providing models, views, and template tags to collect and store user consent for different cookie groups. Current version 1.0.0, requires Python >=3.10 and Django >=4.2. Active development with monthly releases.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"https://github.com/django-cookie-consent/django-cookie-consent","tags":["django","cookies","consent","gdpr"],"install":[{"cmd":"pip install django-cookie-consent","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Required Django version >=4.2","package":"django","optional":false}],"imports":[{"wrong":"from cookie_consent.models import CookieGroup","symbol":"CookieGroup","correct":"from cookie_consent.models import CookieGroup"}],"quickstart":{"code":"# Add to INSTALLED_APPS in settings.py\nINSTALLED_APPS = [\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'cookie_consent',\n]\n\n# Run migrations\n# python manage.py migrate cookie_consent\n\n# In templates, load the templatetag:\n{% load cookie_consent_tags %}\n{% if not request|cookie_group_accepted:\"analytics\" %}\n    {% include \"cookie_consent/cookie_banner.html\" %}\n{% endif %}","lang":"python","description":"Add app to INSTALLED_APPS, run migrations, and use template tags to show a cookie banner."},"warnings":[{"fix":"Ensure you pass the CookieGroup's 'name' field (slug) to the filter, e.g., 'analytics', 'functional'.","message":"The template tag 'cookie_group_accepted' expects a string argument matching the CookieGroup name, not the varname. If you use the wrong attribute, acceptance checking will fail silently.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'cookie_consent.views.accept' and 'cookie_consent.views.decline' in URL patterns.","message":"The 'accept_cookies' and 'decline_cookies' views in older versions were renamed to 'accept' and 'decline'. Using old view names will break in v1.0.","severity":"deprecated","affected_versions":">=0.9,<1.0"}],"env_vars":null,"search_vec":"'1.0.0':28 '3.10':31 '4.2':34 'activ':35 'applic':5 'collect':17 'consent':3,9,21,42 'cooki':2,8,24,41 'current':26 'develop':36 'differ':23 'django':1,4,33,40 'gdpr':43 'group':25 'manag':7 'model':11 'month':38 'provid':10 'python':30 'releas':39 'requir':29 'store':19 'tag':15 'templat':14 'user':20 'version':27 'view':12","created_at":"2026-06-07T12:51:37.845087+00:00","updated_at":"2026-06-07T12:51:37.845087+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmpxpf372ye/venv/lib/python3.12/site-packages/cookie_consent/models.py\", line 60, in <module>\n    class CookieGroup(models.Model):\n  File \"/tmp/tmpxpf372ye/venv/lib/python3.12/site-packages/django/db/models/base.p"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["analytics","security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}