Stub out cookie/privacy policy. Add memcached to docker image

This commit is contained in:
Ross
2022-11-21 15:00:52 +00:00
parent 0b90308394
commit 653baa85ff
8 changed files with 40 additions and 3 deletions
+3 -1
View File
@@ -6,4 +6,6 @@ DB_NAME=rad
DB_HOST=db
DB_USER=django
DB_PASSWORD=postgres
DB_PORT=5432
DB_PORT=5432
MEMCACHE_HOST=cache
+4
View File
@@ -24,6 +24,10 @@ services:
- POSTGRES_USER=django
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=rad
cache:
image: memcached
ports:
- 11211:11211
volumes:
postgres_data:
+2 -1
View File
@@ -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
# }
+3
View File
@@ -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')),
]
+3
View File
@@ -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):
+2 -1
View File
@@ -30,4 +30,5 @@ gunicorn
rich
bs4
django-htmx
debugpy
debugpy
django-cookie-consent
+15
View File
@@ -117,6 +117,21 @@
</div>
</div>
</div>
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<div class="col-md-4 d-flex align-items-center">
<a href="/" class="mb-3 me-2 mb-md-0 text-muted text-decoration-none lh-1">
<svg class="bi" width="30" height="24"><use xlink:href="#bootstrap"></use></svg>
</a>
<span class="text-muted">PenraCourses</span>
</div>
<ul class="nav col-md-4 justify-content-end list-unstyled d-flex">
<li class="ms-3"><a class="text-muted" href="{% url 'privacy' %}">Privacy</a></li>
<li class="ms-3"><a class="text-muted" href="{% url 'cookie_consent_cookie_group_list' %}">Cookies</a></li>
<li class="ms-3"><a class="text-muted" href="#"><svg class="bi" width="24" height="24"><use xlink:href="#facebook"></use></svg></a></li>
</ul>
</footer>
</body>
</html>
+8
View File
@@ -0,0 +1,8 @@
{% extends 'base.html' %}
{% block content %}
<div class="anatomy">
<h1>Privacy Policy</h1>
Under construction
</div>
{% endblock %}