Skip to main content

Setup

Add:

'consent_log'

to INSTALLED_APPS in settings.py and also a set an integer value CONSENT_LOG_DAYS_EXPIRY to settings.py to configure the length of time that consent record live for.

You must also set the boolean value CONSENT_LOG_AUTO_EXPIRE, this setting is treated as a booleand and if true expire_consent_log() is call on every request to the confirm or reject views.

If you use the expire_consent_log() model function (such as via the auto expire setting above), or expireconset management command you can set a maximum frequency at which the the expire run will happen.

CONSENT_LOG_EXPIRY_MIN_PERIOD = 7 # Only run expiry once a week maxmum.

you must set ths variable if you use these entrypoints.

To Use

Add something like the following to your projects urls.py..

path("consent_log/", include("consent_log.urls"))

This add the modules endpoints to your defined urls, our urls are reversable and named consent-log:confirm and ‘consent-log:reject`` within django url namespace so can be reference as those insire your django templates.

You will need to write or import your own frontend integration to send the actions to record to this module.

Metadata

Release files for consent-log 0.1

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

Source distribution (sdist)

Source distribution for consent-log 0.1
File Size Uploaded
consent_log-0.1.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for consent-log 0.1
File Interpreter ABI Platform
consent_log-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

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