Install with:

pip install django-gdpr-assist

Add to your project’s

# Add the app

# Add a new database to log GDPR actions
    'gdpr_log': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'gdpr-log.sqlite3'),
DATABASE_ROUTERS = ['gdpr_assist.routers.EventLogRouter']

You’ll then need to migrate the new database:

./ migrate --database=gdpr_log

Django settings

In addition to the required changes to your settings listed above, there are additional optional settings which you can define to override default behaviour:


This allows you to override the default name of the privacy meta class on models.


This allows you to override the default name of the instantiated privacy meta class on models.


The internal name of the log database. You’ll need to use this in the DATABASES settings, and when migrating.


Set this to True to enable the anonymise_db management command. You will want this to be False on your production deployment.


Set this to False to disable entries being created on the fly in the logging database (see GDPR_LOG_DATABASE_NAME) during anonymisation, this may be useful for large initial anonyimisation tasks.

By default log entries are created when a instance is anonymised and in bulk when calling the anonymise_db command.

If you set this to False you can manually create logging for any instance you have anonymised later via instance._log_gdpr_anonymise(), handling post_anonymise signal or processing over PrivacyAnonymised as required i.e a celery queue or cronjob.


By default, gdpr-assist performs migration checks to ensure that you’ve followed the upgrade instructions correctly to avoid accidental data loss.

See Upgrading for more details of the specific checks.

They may cause a slight performance hit to management command which run checks, so while we recommend you leave them on while upgrading, once the upgrade has been completed and succesfully deployed the checks can safely be disabled afterwards by adding them to Django’s SILENCED_SYSTEMS_CHECKS setting: