{"id":22657116,"url":"https://github.com/briefmnews/django-cookie-consent-authenticateduser","last_synced_at":"2025-03-29T08:12:05.680Z","repository":{"id":81577001,"uuid":"333097806","full_name":"briefmnews/django-cookie-consent-authenticateduser","owner":"briefmnews","description":"Plugin for django-cookie-consent app that saves cookie preferences for authenticated users.","archived":false,"fork":false,"pushed_at":"2025-01-10T18:12:23.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-03T21:52:47.074Z","etag":null,"topics":["cookie","cookie-consent-plugin","django-cookie-consent"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/briefmnews.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-26T13:44:14.000Z","updated_at":"2025-01-10T18:12:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"900620ef-a4fb-4c34-9a5a-8f8ee7ef0590","html_url":"https://github.com/briefmnews/django-cookie-consent-authenticateduser","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briefmnews%2Fdjango-cookie-consent-authenticateduser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briefmnews%2Fdjango-cookie-consent-authenticateduser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briefmnews%2Fdjango-cookie-consent-authenticateduser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briefmnews%2Fdjango-cookie-consent-authenticateduser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/briefmnews","download_url":"https://codeload.github.com/briefmnews/django-cookie-consent-authenticateduser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156416,"owners_count":20732397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookie","cookie-consent-plugin","django-cookie-consent"],"created_at":"2024-12-09T10:17:38.377Z","updated_at":"2025-03-29T08:12:05.661Z","avatar_url":"https://github.com/briefmnews.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-cookie-consent-authenticateduser\n[![Python 3](https://img.shields.io/badge/python-3.7|3.8|3.9-blue.svg)](https://www.python.org/downloads/release/python-390/) \n[![Django 3](https://img.shields.io/badge/django-3.x-blue.svg)](https://docs.djangoproject.com/en/3.2/)\n![Python CI](https://github.com/briefmnews/django-cookie-consent-authenticateduser/workflows/Python%20CI/badge.svg)\n[![codecov](https://codecov.io/gh/briefmnews/django-cookie-consent-authenticateduser/branch/main/graph/badge.svg?token=SXURKTTL1R)](https://codecov.io/gh/briefmnews/django-cookie-consent-authenticateduser)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n\nPlugin for [django-cookie-consent app](https://github.com/briefmnews/django-cookie-consent) that saves user's cookie preferences in the database.\n\n## Installation\nYou need to install `django-cookie-consent` first:\n```\npip install -e git://github.com/briefmnews/django-cookie-consent@plugin#egg=django-cookie-consent\n```\n\nThen, install the `django-cookie-consent-authenticateduser` plugin:\n```\npip install -e git://github.com/briefmnews/django-cookie-consent-authenticateduser@main#egg=django-cookie-consent-authenticateduser\n```\n\n## Setup\nIn order to make `django-cookie-consent-authenticateduser` works, you'll need to follow the steps below:\n\n### Settings\nFirst, you need to add the app, the middleware and the context processor to your settings:\n\n```python\nINSTALLED_APPS = (\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n\n    'cookie_consent',\n    'cookie_consent_authenticateduser',\n    ...\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.middleware.common.CommonMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    \n    'cookie_consent_authenticateduser.middleware.CheckAuthenticatedUserCookieContentMiddleware',\n    ...\n)\n\nTEMPLATES = [\n    {\n        ...,\n        \"OPTIONS\": {\n            \"context_processors\": [\n                ...,\n                \"cookie_consent_authenticateduser.context_processors.display_cookie_consent\",\n                ...,\n            ],\n        },\n    }\n]\n```\n\n## Tests\nTesting is managed by `pytest`. Required package for testing can be installed with:\n```\npip install -r requirements.txt\n```\n\nTo run testing locally:\n```\npytest\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriefmnews%2Fdjango-cookie-consent-authenticateduser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbriefmnews%2Fdjango-cookie-consent-authenticateduser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriefmnews%2Fdjango-cookie-consent-authenticateduser/lists"}