Skip to main content

Ponddy Cookie Agreement

The simple cookie agreement implementation and logging user accepting action.

Installation

Normal

Install using pip

pip install ponddy-cookie-agreement

Add cookie_policy to your INSTALL_APPS setting.

INSTALLED_APPS = [
    ...
    'cookie_policy',
]

Add endpoint on your API root urlpatterns

urlpatterns = [
    ...
    path('cookie/policy/', include('cookie_policy.urls')),
]

Use template

Check your TEMPLATES setting already have request context process in your context_processors

TEMPLATES = [
    {
        ...
        'OPTIONS': {
            'context_processors': [
            ...,
            'django.template.context_processors.request'
            ],
        },
    }
]

Add the CSS and JS file and include tag in your template what page you want to show the cookie policy agreement

{% load static %}

<head>

<link href="{% static 'cookie_agreement/cookie.css'%}" rel="stylesheet">
<script src="{% static 'cookie_agreement/cookie.js' %}"></script>

</head>

<body>
{% include 'cookie_agreement.html' %}
</body>

Settings

URLs

COOKIE_POLICY_URL

PRIVACY_POLICY_URL

TERM_OF_SERVICE_URL

THROTTLE

Setting the restful default throttle rates for throttling the accept cookie policy API

DEFAULT_THROTTLE_RATES

Example:

REST_FRAMEWORK = {
	'DEFAULT_THROTTLE_RATES': {
        'user': '100/day',
        'anon': '100/day',
    }
}

If you do not want to limit user and your settings already have throttle rates please set user and anon to None

REST_FRAMEWORK = {
	'DEFAULT_THROTTLE_RATES': {
        'your_other_scope': '100/day',
        'user': None,
        'anon': None,
    }
}

Release files for ponddy-cookie-agreement 0.0.9

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

Built distribution (wheel)

Table of built distributions (wheels) for ponddy-cookie-agreement 0.0.9
File Interpreter ABI Platform
ponddy_cookie_agreement-0.0.9-py3-none-any.whl Python 3 none any Details

Release history Release notifications | RSS feed

This release

0.0.9 This release

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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