feat: add consent form for data processing

This commit is contained in:
James Graham
2021-01-20 11:53:08 +00:00
parent f2e945c67f
commit 6dc4bd770f
8 changed files with 99 additions and 6 deletions

View File

@@ -327,7 +327,7 @@ LOGGING = {
LOGGING_CONFIG = None
logging.config.dictConfig(LOGGING)
logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
# Admin panel variables
@@ -337,10 +337,17 @@ CONSTANCE_CONFIG = collections.OrderedDict([
'Text to be displayed in a notice banner at the top of every page.')),
('NOTICE_CLASS', ('alert-warning',
'CSS class to use for background of notice banner.')),
('CONSENT_TEXT',
('This is template consent text and should have been replaced. Please contact an admin.',
'Text to be displayed to ask for consent for data collection.'))
])
CONSTANCE_CONFIG_FIELDSETS = {
'Notice Banner': ('NOTICE_TEXT', 'NOTICE_CLASS'),
'Notice Banner': (
'NOTICE_TEXT',
'NOTICE_CLASS',
),
'Data Collection': ('CONSENT_TEXT', ),
}
CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
@@ -379,12 +386,10 @@ else:
default=(EMAIL_PORT == 465),
cast=bool)
# Upstream API keys
GOOGLE_MAPS_API_KEY = config('GOOGLE_MAPS_API_KEY', default=None)
# Import customisation app settings if present
try: