(unfinished WIP, not for use yet)
Manages consent from the user's perspective and with GDPR in mind
June 2025: This project is currently in hiatus, pending an update to its codebase to align with GovStack's Consent specification and introduce new a Developer-oriented set of tools for handling consent in Django models.
October 2023: There are still some incomin architectural changes in the Consent Building Block 1.1 that we are waiting for.
September 2023: If you're interested in the politics, of consent, you might be interested in reading The Left Needs To Stop Idolizing The GDPR.
August 2023: Matrix channel added: #django-consent:data.coop
May 2023: GovStack specification for a Consent Building Block 1.0 is released.
October 2021: @benjaoming has joined GovStack's working group on Consent Management.
Currently (or conventionally), organizations and developers imagine how to handle data from the organization's or the developer's perspective. Through quantity-driven and often needlessly greedy data collection and useless UIs, we end up with solutions to convince/manipulate/coerce users to consent to using their data. The user's consent is viewed as a legally required obstacle that's supposed to be clicked away and not actually understood. This isn't what consent should mean.
We need different models and solutions.
Ideally, we should step back from our immediate short-term development issues and imagine how we would want our own data to be handled. By assuming the real user's perspective, we can identify better models and solutions for consent management where the management part is seen as the user's ability to manage their own consent.
pip install django-consent
Since this is a new project, some questions are still open for discussion. This project prefers the simplicity of maximum privacy, but to ensure no misunderstandings and openness about decisions, refer to the following.
Issues are welcomed with the tag question
to verify, challenge elaborate or add to this list.
Your application needs the ability to easily delete and anonymize data. Not just because of GDPR, but because it's the right thing to do.
No matter the usage of django-consent, you still need to consider this:
In any implementation, you should consider how you associate personally identifiable information. This can be a name, email, IP address, physical address and unique combinations (i.e. employer+job+department).
In order to design a Django project for privacy, consider the following:
User
instance. Do not relate personally identifiable data in other ways.User.id
should use on_delete=models.CASCADE
User.id
has null=True
and is nullified, then remaining data in the model should not identify the person. You should design your models to only allow null values for User
relations when in fact the remaining data in the row and its relations cannot be used to identify the person from your data.Consider the following:
Every individual implementation should do its own legal assessment as necessary.
The GPL v3 license which this is distributed under also applies to the documentation and this README:
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# Enable your Python environment (example) workon myproject # Installation pip install django-consent-temp
Now go to your Django project's settings and add:
INSTALLED_APPS = [ # ... 'django_consent', ]
To use unsubscribe views, add this to your project's urls.py
:
urlpatterns = [ # ... path('consent/', include('django_consent.urls')), ]
If you want to be able to send out confirmation emails or otherwise email your users from management scripts and likewise, you need to configure settings.SITE_ID = n
to ensure that a correct default domain is guessed in the absence of an active HTTP request.
To install an editable version into a project, activate your project's virtualenv and run this:
# Installs an editable version of django-consent pip install -e . # Installs an editable version of django-consent's development requirements pip install -e '.[develop]' # Enables pre-commit pre-commit install
We ship a demo project for development and example code purposes. You'll find it in the demo/
folder of this repository.
# Choose your way of creating a virtualenv, in this case with virtualenvwrapper mkvirtualenv -p python3 demo # Activate the virtualenv workon demo # Go to the demo/ folder cd demo/ # Create database python manage.py migrate # Create a superuser python manage.py createsuperuser # Start the dev server python manage.py runserver # Go to the admin and create a consent object xdg-open http://127.0.0.1:8000/admin/django_consent/consentsource/ # After that, go to this page and you can see a sign up xdg-open http://127.0.0.1:8000/django-consent 0.2 (2011)
This project is not a fork of the old django-consent but is a new project when the PyPi repo owners gave us permissions to take over. The former package is archived here: https://github.com/d0ugal/django-consent
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4