A Django app for managing GDPR compliancy
Project description
GDPR Helpers
GDPR Helpers is a Django app for easy GDPR compliance.
Quickstart
- Install Django GDPR Helpers:
pip install django-gdpr-helpers
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'gdpr_helpers',
...
)
Define your reasons for asking personal data and assign them to a group:
from gdpr_helpers.models import LegalReasonGroup, egalReason
legal_group = LegalReasonGroup.objects.create(where="registration")
LegalReason.objects.create(legal_group=legal_group, flag_text="Required for registration", slug="registration", active=True, required=True)
LegalReason.objects.create(legal_group=legal_group, flag_text="Optional for registration", slug="marketing", active=True, required=False)
Or use the django-admin.
Add the Mixin to a form that create an object and need privacy flags, remember to save the PrivacyLog in someplace:
from django import forms
from gdpr_helpers.forms import GDPRFormMixin
from .models import User
class RegistrationForm(GDPRFormMixin):
class Meta:
model = User
where = "registration"
fields = ("whatever_fields_from_model",)
def save(self):
user = super().save()
PrivacyLog.objects.create_log(content_object=user, cleaned_data=self.cleaned_data)
return user
Note that the privacy fields are already injected in the form.
Filling the form will now create logs for the object created.
Features
Can define Legal reason for which you are collecting personal data
Create logs for the data you collected with a timestamp and what the user consented to
Logs are anonymous
TODO
When the user/system/admin removes the object we must keep a reference, maybe an unique ID that binds the deleted record to the logs
Adding a serializer to use it on rest_framework project
Add the ability to define a timer for data based on Legal reason, so we can destroy it after it expires or ask the user for another consent
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-gdpr-helpers-0.4.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 755625a0bc7e23dad16fc597a8a907cc9addc6716b71ee29ebeaf270f1ab8101 |
|
MD5 | 176533ddde5fb04e309c725295990518 |
|
BLAKE2b-256 | ef307b5635ce59988fbf91949c20cba3261bb3549ce9f600ff9660d395672b06 |
Hashes for django_gdpr_helpers-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ccaf0d7e0816cf0ca41ac130eaaecfd2f3f83e23e4ba4271afa686ee5bb85a2 |
|
MD5 | b96b577c9882f8c2b4b33a017eee5911 |
|
BLAKE2b-256 | 36fd3274d368a6d457fd458e225dcce9e7f95b4a04256b58017ad42c6e3c9b64 |