From e44e2e41217558250cb4bac40571249154669248 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Sun, 5 Jan 2020 22:14:19 +0000 Subject: [PATCH] add cookie warning and privacy statement text and link --- .gitignore | 3 + INSTALL.md | 22 +- www/maposmatic/templates/maposmatic/base.html | 15 +- .../templates/maposmatic/privacy.html | 280 ++++++++++++++++-- www/settings.py | 5 + www/templates/cookielaw/banner.html | 43 +++ 6 files changed, 334 insertions(+), 34 deletions(-) create mode 100644 www/templates/cookielaw/banner.html diff --git a/.gitignore b/.gitignore index 07e431c6..bc9753ac 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,9 @@ # Ignore npm installation directory /www/static/node_modules +# Ignore directories created by django collectstatic +/www/static/django-cookie-law + # Ignore output directories /logs /rendering diff --git a/INSTALL.md b/INSTALL.md index fb470ddc..7d08c459 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -8,13 +8,16 @@ MapOSMatic depends on : * Python, the programming language. + * OCitySMap, the rendering pipeline for MapOSMatic. See OCitySMap's + install file for installation instructions and OCitySMap's + dependencies. + * Django, the Web framework used to develop the Web front-end, but also used for the maposmaticd daemon to conveniently access the database through Django's ORM. - * OCitySMap, the rendering pipeline for MapOSMatic. See OCitySMap's - install file for installation instructions and OCitySMap's - dependencies. + * The Django Cookie Law application for compliance with EU cookie + regulations * python-psycopg2, to let Django access the PostgreSQL database. @@ -49,11 +52,18 @@ and modified to match your installation configuration. Likewise for ``www/maposmatic.wsgi.dist`` and ``scripts/config.py.dist``, as well as ``www/maposmatic.wsgi`` and ``scripts/config.py``. +Some static files from django applications need to be copied into +the maposmatic static media directory: + +```bash + python3 manage.py collectstatic +``` + The rendering database must then be initialized with the tables needed for MapOSMatic, using : ```bash - python www/manage.py migrate + python3 manage.py migrate ``` The rendering daemon should be run in the background. It will fetch rendering @@ -68,7 +78,7 @@ variables and paths for the daemon to run correctly. Then, you can run the rendering daemon through the wrapper with: ```bash - .../scripts/wrapper.py scripts/daemon.py & + scripts/wrapper.py scripts/daemon.py & ``` You'll find in ``support/init-maposmaticd-template`` an init script @@ -85,7 +95,7 @@ Before you think about configuring your web server to provide the maposmatic services, you should try them locally first: ```bash - .../www/manage.py runserver + ./manage.py runserver ``` Then point your web browser to the address mentioned in the output diff --git a/www/maposmatic/templates/maposmatic/base.html b/www/maposmatic/templates/maposmatic/base.html index 973d8953..9b8b57d2 100644 --- a/www/maposmatic/templates/maposmatic/base.html +++ b/www/maposmatic/templates/maposmatic/base.html @@ -27,6 +27,7 @@ {% load i18n %} {% load l10n %} {% load extratags %} +{% load cookielaw_tags%} @@ -80,6 +81,9 @@ + + + @@ -88,8 +92,10 @@ {% include "./base-parts/navbar.html" %} - +
+ {% cookielaw_banner %} + {% if MAINTENANCE_NOTICE %}

Notice: {{MAINTENANCE_NOTICE|safe }}

@@ -115,11 +121,10 @@ {% endif %}

{{ EXTRA_FOOTER|safe }} -