I need help implementing this package into this django project:
When viewing the page source, I see the app's HTML loaded from the render tags. But on the actual page, I am not seeing any of the outputted HTML from those render tags.
Can someone please summarize a step by step set of instructions to get this package to work? The instructions provided can be confusing sometimes.
I did not do the following and am not sure how to do these parts:
1) install the add-on on divio.com or via pypi (would rather not install this since it seems to costs money - unless there is a way to use it for free)
2) update your templates/django_privacy_mgmt to reflect your frontend toolchain situation (not sure where in my project to put these files.
3) Then check what kind of tracking items your website is using (either in the templates or via Google Tag Manager or in any imaginable other way) and add them in the "Django Privacy Mgmt" section of the Django Admin interface to the list of 'Tracking Items'. This is necessary so that we can show a list of tracking items to the user in the 'privacy settings' modal.
4) Then implement conditional logic that enables or disables the tracking items that you identified in the previous step (see next chapter).
Here are the steps I followed:
pip3 install django-privacy-mgmt
pip3 install django-parler
pip3 install django-sekizai
python3 manage.py migrate
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR,"templates")],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'sekizai.context_processors.sekizai',
],
},
},
]
SITE_ID = 1
INSTALLED_APPS = [
'django.contrib.sites',
'sekizai',
'django_privacy_mgmt',
'parler',
]
{% load privacy %}
<!DOCTYPE html>
<html lang="en">
<head>
{% load static %}
{% render_privacy_api %}
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<body>
{% render_privacy_banner %}
{% render_privacy_settings_modal %}
{% render_privacy_settings_modal_link %}
</body>