diff --git a/docker/.env.dev b/docker/.env.dev index 2f32e8a2..7e6247aa 100644 --- a/docker/.env.dev +++ b/docker/.env.dev @@ -6,4 +6,6 @@ DB_NAME=rad DB_HOST=db DB_USER=django DB_PASSWORD=postgres -DB_PORT=5432 \ No newline at end of file +DB_PORT=5432 + +MEMCACHE_HOST=cache \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 068df7f7..1d35b7ac 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -24,6 +24,10 @@ services: - POSTGRES_USER=django - POSTGRES_PASSWORD=postgres - POSTGRES_DB=rad + cache: + image: memcached + ports: + - 11211:11211 volumes: postgres_data: \ No newline at end of file diff --git a/rad/settings.py b/rad/settings.py index f61a919a..d812dc84 100644 --- a/rad/settings.py +++ b/rad/settings.py @@ -59,6 +59,7 @@ INSTALLED_APPS = [ "dal", "dal_select2", "dal_queryset_sequence", + "cookie_consent", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", @@ -217,7 +218,7 @@ CORS_ORIGIN_ALLOW_ALL = True CACHES = { "default": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", - "LOCATION": "127.0.0.1:11211", + "LOCATION": f'{os.environ.get("MEMCACHE_HOST", "127.0.0.1")}:11211', #'OPTIONS': { # 'server_max_value_length': 1024 * 1024 * 10 # } diff --git a/rad/urls.py b/rad/urls.py index b155ca64..28cd869b 100644 --- a/rad/urls.py +++ b/rad/urls.py @@ -136,6 +136,9 @@ urlpatterns = [ path("api/", include(router.urls)), path("api-auth/", include("rest_framework.urls")), path("tinymce/", include("tinymce.urls")), + path("cookies/", include("cookie_consent.urls")), + #path("cookies/", include("cookie_consent.urls")), + path("privacy/", views.privacy_view, name="privacy"), # path('select2/', include('select2.urls')), ] diff --git a/rad/views.py b/rad/views.py index 06391197..439612f8 100644 --- a/rad/views.py +++ b/rad/views.py @@ -478,6 +478,9 @@ def view_feedback(request): }, ) +def privacy_view(request): + return render(request, "privacy.html") + # HTTP Error 400 def page_not_found(request, exception): diff --git a/requirements.txt b/requirements.txt index 20d03a36..017680d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,4 +30,5 @@ gunicorn rich bs4 django-htmx -debugpy \ No newline at end of file +debugpy +django-cookie-consent \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 9551e4dc..b5b90d96 100644 --- a/templates/base.html +++ b/templates/base.html @@ -117,6 +117,21 @@ + + \ No newline at end of file diff --git a/templates/privacy.html b/templates/privacy.html new file mode 100644 index 00000000..f070a5b2 --- /dev/null +++ b/templates/privacy.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} + +{% block content %} +
+

Privacy Policy

+ Under construction +
+{% endblock %} \ No newline at end of file