From bb05b7656c4d16a4742aa787d990fe16834db9f8 Mon Sep 17 00:00:00 2001 From: rlskoeser Date: Wed, 16 Sep 2020 09:47:45 -0400 Subject: [PATCH] Use django-apptemplates to specify richtextpage template inheritance --- cdhweb/settings.py | 6 +++++- requirements/prod.txt | 1 + templates/pages/richtextpage.html | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cdhweb/settings.py b/cdhweb/settings.py index 2078e0919..4d2b750d2 100644 --- a/cdhweb/settings.py +++ b/cdhweb/settings.py @@ -257,8 +257,12 @@ "DIRS": [ os.path.join(PROJECT_ROOT, "templates") ], - "APP_DIRS": True, "OPTIONS": { + 'loaders': [ + 'apptemplates.Loader', + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + ], "context_processors": [ "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", diff --git a/requirements/prod.txt b/requirements/prod.txt index b2853ea3f..12aa9e5bd 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -15,3 +15,4 @@ python-dateutil icalendar attrdict django-fullurl +django-apptemplates diff --git a/templates/pages/richtextpage.html b/templates/pages/richtextpage.html index 71eaafc82..1f7d0ef4d 100644 --- a/templates/pages/richtextpage.html +++ b/templates/pages/richtextpage.html @@ -1,4 +1,4 @@ -{% extends "pages/richtextpage.html" %} +{% extends "pages:pages/richtextpage.html" %} {% block bodyattrs %}class="richtextpage{% if not page.published %} draft{% endif %}"{% endblock %}