We need to implement a cookie consent banner and a privacy policy page to ensure compliance with data protection regulations (e.g., GDPR) and improve transparency for users.
Requirements
Cookie Banner
Implement a cookie consent system that:
Privacy Policy Page
Create a page accessible from the footer that includes:
Technical Details
- Store privacy policy and cookie policy texts outside of templates (e.g., in models or Markdown/HTML files).
- Provide an interface to edit these texts via the Django admin panel.
- Expose policy texts through a dedicated API endpoint (e.g.,
/api/policy/ and /api/cookies/).
- Implement a frontend component for the cookie banner (using vanilla JS).
- Use a consistent design where “Accept All” and “Reject All” buttons are equally visible.
- Consider using or extending existing libraries such as:
- Optional: store consent history in a simple model (e.g.,
CookieConsentLog).
Recommendations (for uncertain points)
- Personalization of cookies: Implement basic category toggling first (essential / non-essential). Later, add detailed control (e.g., separate analytics vs marketing).
- Storage method: Prefer cookies with a short JSON structure over
localStorage for consistency and server awareness.
- Consent record: For now, store consent locally. Add DB-based logging only if legal compliance requires it.
- Editable texts: Use Markdown fields in models, rendered dynamically, instead of static
.html templates.
- API exposure: Provide read-only REST API endpoints so frontend can fetch the latest policy text.
Testing
Definition of Done
We need to implement a cookie consent banner and a privacy policy page to ensure compliance with data protection regulations (e.g., GDPR) and improve transparency for users.
Requirements
Cookie Banner
Implement a cookie consent system that:
localStorageor a dedicated cookie).Privacy Policy Page
Create a page accessible from the footer that includes:
Technical Details
/api/policy/and/api/cookies/).django-cookie-consentcookiebanner.jsCookieConsentLog).Recommendations (for uncertain points)
localStoragefor consistency and server awareness..htmltemplates.Testing
Definition of Done