From 2c3a332067e6cd470ee76f7e46025fbc2cd79cfb Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Thu, 12 May 2022 12:18:58 -0500 Subject: [PATCH 01/12] wip-feat(fp-1487): pythonic app template load --- _readme-cms/_templates/README.md | 31 ++++++++------------------- frontera-cms/settings_custom.py | 15 ++++++++++--- neuronex-cms/settings_custom.py | 10 ++++++++- neuronex-cms/templates/fullwidth.html | 12 +---------- protx-cms/settings_custom.py | 8 ++++++- texascale-org/settings_custom.py | 26 ++++++++++++++++------ utrc-cms/settings_custom.py | 8 ++++++- 7 files changed, 64 insertions(+), 46 deletions(-) diff --git a/_readme-cms/_templates/README.md b/_readme-cms/_templates/README.md index 70b33603..035ef078 100644 --- a/_readme-cms/_templates/README.md +++ b/_readme-cms/_templates/README.md @@ -1,32 +1,19 @@ # TACC CMS Project - Example - Templates -Templates specific to this project __must__ be in this directory. -Otherwise, they will be unavailable to [Core CMS] loading this project. +You may overwrite Core CMS templates and 3rd-party apps/plugin templates. -The directory structure here __should__ mirror [Core CMS]: - [`/taccsite_cms/templates`][core-tpl-dir] +## Page Templates -This consistency lets us override templates in Django fashion. +To make new templates available as page templates for CMS editors, replace or add to `CMS_TEMPLATES` setting. -[Core CMS]: https://github.com/TACC/Core-CMS -[core-tpl-dir]: https://github.com/TACC/Core-CMS/blob/main/taccsite_cms/static/site_cms - -## How to Write Template Path - -Where `name-of-project` is a CMS projects with custom templates: - -- `/name-of-project/templates/___.html` +## Overwrite Core -### How to Overwrite Core Templates - -1. Create a template of the same name here. -2. Reference the template (where needed) with the correct path. - -⚠️ A project __must not__ overwrite the Core CMS `base.html`. +1. Create a template of the same name as the [Core CMS template][core-tpl-dir] to overwrite. +2. Replace or extend the content of the overwritten template. ## Overwrite Apps or Plugins -You may overwrite apps [like Core][core-overwrite-doc]. -But you msut do so relative to this directory. +Follow [Core CMS instructions][core-tpl-doc], but within _this_ directory instead. -[core-overwrite-doc]: https://github.com/TACC/Core-CMS/tree/main/taccsite_cms/templates/README.md#overwrite-apps-or-plugins +[core-tpl-dir]: https://github.com/TACC/Core-CMS/blob/main/taccsite_cms/static/site_cms +[core-tpl-doc]: https://github.com/TACC/Core-CMS/tree/main/taccsite_cms/templates diff --git a/frontera-cms/settings_custom.py b/frontera-cms/settings_custom.py index 9d052346..c591c6c2 100644 --- a/frontera-cms/settings_custom.py +++ b/frontera-cms/settings_custom.py @@ -10,9 +10,10 @@ ######################## CMS_TEMPLATES = ( - ('frontera-cms/templates/standard.html', 'Standard'), - ('frontera-cms/templates/fullwidth.html', 'Full Width'), - ('frontera-cms/templates/home.html', 'Homepage'), + ('standard.html', 'Standard'), + ('fullwidth.html', 'Full Width'), + + ('home.html', 'Homepage'), ('guide.html', 'Guide'), ('guides/getting_started.html', 'Guide: Getting Started'), @@ -21,6 +22,14 @@ ('guides/portal_technology.html', 'Guide: Portal Technology Stack') ) +# FP-1645: Remove CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES_DEPRECATED = ( + ('frontera-cms/templates/standard.html', 'DEPRECATED Standard'), + ('frontera-cms/templates/fullwidth.html', 'DEPRECATED Full Width'), + ('frontera-cms/templates/home.html', 'DEPRECATED Homepage'), +) +CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED + ######################## # TACC: BRANDING ######################## diff --git a/neuronex-cms/settings_custom.py b/neuronex-cms/settings_custom.py index 0eb7dba6..86fa5154 100644 --- a/neuronex-cms/settings_custom.py +++ b/neuronex-cms/settings_custom.py @@ -10,8 +10,10 @@ ######################## CMS_TEMPLATES = ( - ('neuronex-cms/templates/fullwidth.html', 'Fullwidth'), + ('fullwidth.html', 'Fullwidth'), + ('home_portal.html', 'Standard Portal Homepage'), + ('guide.html', 'Guide'), ('guides/getting_started.html', 'Guide: Getting Started'), ('guides/data_transfer.html', 'Guide: Data Transfer'), @@ -19,6 +21,12 @@ ('guides/portal_technology.html', 'Guide: Portal Technology Stack') ) +# FP-1645: Remove CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES_DEPRECATED = ( + ('neuronex-cms/templates/fullwidth.html', 'DEPRECATED Fullwidth'), +) +CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED + ######################## # TACC: BRANDING ######################## diff --git a/neuronex-cms/templates/fullwidth.html b/neuronex-cms/templates/fullwidth.html index c4ec6668..123dffea 100644 --- a/neuronex-cms/templates/fullwidth.html +++ b/neuronex-cms/templates/fullwidth.html @@ -1,16 +1,6 @@ -{% extends "base.html" %} +{% extends "fullwidth.html" %} {% load cms_tags staticfiles %} -{% block title %}{% page_attribute "page_title" %}{% endblock title %} - -{% block assets_font %} - {{ block.super }} -{% endblock assets_font %} - -{% block content %} -{% placeholder "content" %} -{% endblock content %} - {% block assets_custom %} {{ block.super }} diff --git a/protx-cms/settings_custom.py b/protx-cms/settings_custom.py index fa5dc67f..493b4f63 100644 --- a/protx-cms/settings_custom.py +++ b/protx-cms/settings_custom.py @@ -14,12 +14,18 @@ ('fullwidth.html', 'Full Width'), ('guide.html', 'Guide'), - ('protx-cms/templates/getting_started.html', 'Guide: Getting Started'), + ('guides/getting_started.html', 'Guide: Getting Started'), ('guides/data_transfer.html', 'Guide: Data Transfer'), ('guides/data_transfer.globus.html', 'Guide: Globus Data Transfer'), ('guides/portal_technology.html', 'Guide: Portal Technology Stack') ) +# FP-1645: Remove CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES_DEPRECATED = ( + ('protx-cms/templates/getting_started.html', 'DEPRECATED Guide: Getting Started'), +) +CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED + ######################## # TACC: (DEPRECATED) ######################## diff --git a/texascale-org/settings_custom.py b/texascale-org/settings_custom.py index 699d73cd..2b6d6d95 100644 --- a/texascale-org/settings_custom.py +++ b/texascale-org/settings_custom.py @@ -7,15 +7,27 @@ ######################## CMS_TEMPLATES = ( - ('texascale-org/templates/fullwidth.html', 'Fullwidth'), - ('texascale-org/templates/category.html', 'Category'), - ('texascale-org/templates/article.html', 'Article'), - ('texascale-org/templates/article.freeform.html', 'Article (Free-Form)'), - ('texascale-org/templates/article.sidebar-right.html', 'Article (Right Sidebar)'), - ('texascale-org/templates/article.visual.html', 'Article (Full-Size Visual)'), - ('texascale-org/templates/article.image-map.html', 'Article (Image Map)'), + ('fullwidth.html', 'Fullwidth'), + ('category.html', 'Category'), + ('article.html', 'Article'), + ('article.freeform.html', 'Article (Free-Form)'), + ('article.sidebar-right.html', 'Article (Right Sidebar)'), + ('article.visual.html', 'Article (Full-Size Visual)'), + ('article.image-map.html', 'Article (Image Map)'), ) +# FP-1645: Remove CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES_DEPRECATED = ( + ('texascale-org/templates/fullwidth.html', 'DEPRECATED Fullwidth'), + ('texascale-org/templates/category.html', 'DEPRECATED Category'), + ('texascale-org/templates/article.html', 'DEPRECATED Article'), + ('texascale-org/templates/article.freeform.html', 'DEPRECATED Article (Free-Form)'), + ('texascale-org/templates/article.sidebar-right.html', 'DEPRECATED Article (Right Sidebar)'), + ('texascale-org/templates/article.visual.html', 'DEPRECATED Article (Full-Size Visual)'), + ('texascale-org/templates/article.image-map.html', 'DEPRECATED Article (Image Map)'), +) +CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED + ######################## # TACC: LOGOS ######################## diff --git a/utrc-cms/settings_custom.py b/utrc-cms/settings_custom.py index f676e9cd..6f690913 100644 --- a/utrc-cms/settings_custom.py +++ b/utrc-cms/settings_custom.py @@ -11,7 +11,7 @@ ('standard.html', 'Standard'), ('fullwidth.html', 'Full Width'), - ('utrc-cms/templates/home.html', 'Home'), + ('home.html', 'Home'), ('guide.html', 'Guide'), ('guides/getting_started.html', 'Guide: Getting Started'), @@ -20,6 +20,12 @@ ('guides/portal_technology.html', 'Guide: Portal Technology Stack') ) +# FP-1645: Remove CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES_DEPRECATED = ( + ('utrc-cms/templates/home.html', 'DEPRECATED Home'), +) +CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED + ######################## # TACC: LOGOS ######################## From dc2054f5518913e00a1ad23f4546f620647d1b4a Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Fri, 20 May 2022 10:33:26 -0500 Subject: [PATCH 02/12] feat(fp-1652)!: correctly extend core templates - install blog apps at end of list (simpler) - load settings at top of settings_custom, bot middle - fix template inheritence (texascale, ecep) BREAKING CHANGE: template inheritence now incompatible with main --- ecep-cms/settings_custom.py | 10 +++------- texascale-org/settings_custom.py | 11 +++++------ texascale-org/templates/article.html | 2 +- texascale-org/templates/category.html | 2 +- .../templates/{ => taccsite_cms}/fullwidth.html | 7 +++---- 5 files changed, 13 insertions(+), 19 deletions(-) rename texascale-org/templates/{ => taccsite_cms}/fullwidth.html (73%) diff --git a/ecep-cms/settings_custom.py b/ecep-cms/settings_custom.py index 04a0e155..455eaef5 100644 --- a/ecep-cms/settings_custom.py +++ b/ecep-cms/settings_custom.py @@ -2,8 +2,7 @@ # TACC WMA CMS SITE: # *.ECEP.TACC.UTEXAS.EDU -# FAQ: Some _VARIABLES are duplicated from settings.py (but prefixed with "_") -# because current infrastructure lacks ability to reference default values +from taccsite_cms.settings import * ######################## # DJANGO CMS SETTINGS @@ -92,10 +91,7 @@ # NEWS / BLOG ######################## -from taccsite_cms.settings import INSTALLED_APPS - -tacc_app_index = INSTALLED_APPS.index('taccsite_cms') -INSTALLED_APPS[tacc_app_index:tacc_app_index] = [ +INSTALLED_APPS = INSTALLED_APPS + [ # 'filer', # already in Core # 'easy_thumbnails', # already in Core 'parler', @@ -137,4 +133,4 @@ # CLIENT BUILD SETTINGS ######################## -ROOT_URLCONF = 'taccsite_custom.ecep-cms.urls' +ROOT_URLCONF = TACC_CUSTOM_ROOT + '.ecep-cms.urls' diff --git a/texascale-org/settings_custom.py b/texascale-org/settings_custom.py index 2b6d6d95..3e634514 100644 --- a/texascale-org/settings_custom.py +++ b/texascale-org/settings_custom.py @@ -1,6 +1,8 @@ ## CUSTOM SETTINGS VALUES. # TACC WMA CMS SITE: -# SCIVISCOLOR.ORG +# TEXASCALE(-DEV).TACC.UTEXAS.EDU + +from taccsite_cms.settings import * ######################## # DJANGO CMS SETTINGS @@ -53,10 +55,7 @@ # NEWS / BLOG ######################## -from taccsite_cms.settings import INSTALLED_APPS - -tacc_app_index = INSTALLED_APPS.index('taccsite_cms') -INSTALLED_APPS[tacc_app_index:tacc_app_index] = [ +INSTALLED_APPS = INSTALLED_APPS + [ # 'filer', # already in Core # 'easy_thumbnails', # already in Core 'parler', @@ -99,4 +98,4 @@ ######################## # TACC/Core-CMS-Resources#75: Load custom urls.py so we can add urlpatterns for taggit_autosuggest -ROOT_URLCONF = 'taccsite_custom.texascale-org.urls' +ROOT_URLCONF = TACC_CUSTOM_ROOT + '.texascale-org.urls' diff --git a/texascale-org/templates/article.html b/texascale-org/templates/article.html index 173f345f..058ffa28 100644 --- a/texascale-org/templates/article.html +++ b/texascale-org/templates/article.html @@ -1,4 +1,4 @@ -{% extends "./fullwidth.html" %} +{% extends "fullwidth.html" %} {% load cms_tags staticfiles %} {% block assets_custom %} diff --git a/texascale-org/templates/category.html b/texascale-org/templates/category.html index 7c4b3ff9..17d35bc7 100644 --- a/texascale-org/templates/category.html +++ b/texascale-org/templates/category.html @@ -1,4 +1,4 @@ -{% extends "./fullwidth.html" %} +{% extends "fullwidth.html" %} {% load cms_tags staticfiles %} {% block assets_custom %} diff --git a/texascale-org/templates/fullwidth.html b/texascale-org/templates/taccsite_cms/fullwidth.html similarity index 73% rename from texascale-org/templates/fullwidth.html rename to texascale-org/templates/taccsite_cms/fullwidth.html index 74250fc7..be3062f3 100644 --- a/texascale-org/templates/fullwidth.html +++ b/texascale-org/templates/taccsite_cms/fullwidth.html @@ -1,8 +1,6 @@ -{% extends "base.html" %} +{% extends "fullwidth.html" %} {% load cms_tags staticfiles %} -{% block title %}{% page_attribute "page_title" %}{% endblock title %} - {% block assets_font %} {% endblock assets_font %} @@ -14,5 +12,6 @@ {% endblock assets_custom %} {% block content %} -{% placeholder "content" %} + + {{ block.super }} {% endblock content %} From fbe4c800cc8c067c34a25e2667f1922c4cede01a Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Fri, 20 May 2022 16:08:26 -0500 Subject: [PATCH 03/12] fix(fp-1652): load settings_local (cuz core don't) --- ecep-cms/settings_custom.py | 5 +++++ texascale-org/settings_custom.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ecep-cms/settings_custom.py b/ecep-cms/settings_custom.py index 455eaef5..ae4df2e3 100644 --- a/ecep-cms/settings_custom.py +++ b/ecep-cms/settings_custom.py @@ -134,3 +134,8 @@ ######################## ROOT_URLCONF = TACC_CUSTOM_ROOT + '.ecep-cms.urls' + +try: + from taccsite_cms.settings_local import * +except ModuleNotFoundError: + pass diff --git a/texascale-org/settings_custom.py b/texascale-org/settings_custom.py index 3e634514..20323de4 100644 --- a/texascale-org/settings_custom.py +++ b/texascale-org/settings_custom.py @@ -99,3 +99,8 @@ # TACC/Core-CMS-Resources#75: Load custom urls.py so we can add urlpatterns for taggit_autosuggest ROOT_URLCONF = TACC_CUSTOM_ROOT + '.texascale-org.urls' + +try: + from taccsite_cms.settings_local import * +except ModuleNotFoundError: + pass From cbe1130d48c2ae532697af0613cf24c0563b5738 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Fri, 20 May 2022 16:15:42 -0500 Subject: [PATCH 04/12] chore(fp-1652): simpler isntalled_apps extend --- ecep-cms/settings_custom.py | 2 +- texascale-org/settings_custom.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ecep-cms/settings_custom.py b/ecep-cms/settings_custom.py index ae4df2e3..1f6a3ecc 100644 --- a/ecep-cms/settings_custom.py +++ b/ecep-cms/settings_custom.py @@ -91,7 +91,7 @@ # NEWS / BLOG ######################## -INSTALLED_APPS = INSTALLED_APPS + [ +INSTALLED_APPS += [ # 'filer', # already in Core # 'easy_thumbnails', # already in Core 'parler', diff --git a/texascale-org/settings_custom.py b/texascale-org/settings_custom.py index 20323de4..5fbc8e32 100644 --- a/texascale-org/settings_custom.py +++ b/texascale-org/settings_custom.py @@ -55,7 +55,7 @@ # NEWS / BLOG ######################## -INSTALLED_APPS = INSTALLED_APPS + [ +INSTALLED_APPS += [ # 'filer', # already in Core # 'easy_thumbnails', # already in Core 'parler', From 38067e8318c6d852c6727a4dace91629c0b9cc6f Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Mon, 23 May 2022 09:07:50 -0500 Subject: [PATCH 05/12] chore(fp-1652): simpler CMS_TEMPLATES extend --- frontera-cms/settings_custom.py | 2 +- neuronex-cms/settings_custom.py | 2 +- protx-cms/settings_custom.py | 2 +- texascale-org/settings_custom.py | 2 +- utrc-cms/settings_custom.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontera-cms/settings_custom.py b/frontera-cms/settings_custom.py index c591c6c2..aa3eef62 100644 --- a/frontera-cms/settings_custom.py +++ b/frontera-cms/settings_custom.py @@ -28,7 +28,7 @@ ('frontera-cms/templates/fullwidth.html', 'DEPRECATED Full Width'), ('frontera-cms/templates/home.html', 'DEPRECATED Homepage'), ) -CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES += CMS_TEMPLATES_DEPRECATED ######################## # TACC: BRANDING diff --git a/neuronex-cms/settings_custom.py b/neuronex-cms/settings_custom.py index 86fa5154..96c0fc56 100644 --- a/neuronex-cms/settings_custom.py +++ b/neuronex-cms/settings_custom.py @@ -25,7 +25,7 @@ CMS_TEMPLATES_DEPRECATED = ( ('neuronex-cms/templates/fullwidth.html', 'DEPRECATED Fullwidth'), ) -CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES += CMS_TEMPLATES_DEPRECATED ######################## # TACC: BRANDING diff --git a/protx-cms/settings_custom.py b/protx-cms/settings_custom.py index 493b4f63..1a73cc07 100644 --- a/protx-cms/settings_custom.py +++ b/protx-cms/settings_custom.py @@ -24,7 +24,7 @@ CMS_TEMPLATES_DEPRECATED = ( ('protx-cms/templates/getting_started.html', 'DEPRECATED Guide: Getting Started'), ) -CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES += CMS_TEMPLATES_DEPRECATED ######################## # TACC: (DEPRECATED) diff --git a/texascale-org/settings_custom.py b/texascale-org/settings_custom.py index 5fbc8e32..d0c340bd 100644 --- a/texascale-org/settings_custom.py +++ b/texascale-org/settings_custom.py @@ -28,7 +28,7 @@ ('texascale-org/templates/article.visual.html', 'DEPRECATED Article (Full-Size Visual)'), ('texascale-org/templates/article.image-map.html', 'DEPRECATED Article (Image Map)'), ) -CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES += CMS_TEMPLATES_DEPRECATED ######################## # TACC: LOGOS diff --git a/utrc-cms/settings_custom.py b/utrc-cms/settings_custom.py index 6f690913..11a1c9e1 100644 --- a/utrc-cms/settings_custom.py +++ b/utrc-cms/settings_custom.py @@ -24,7 +24,7 @@ CMS_TEMPLATES_DEPRECATED = ( ('utrc-cms/templates/home.html', 'DEPRECATED Home'), ) -CMS_TEMPLATES = CMS_TEMPLATES + CMS_TEMPLATES_DEPRECATED +CMS_TEMPLATES += CMS_TEMPLATES_DEPRECATED ######################## # TACC: LOGOS From 1bd360cf3079300583d860085ce3001145e71c48 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Mon, 23 May 2022 09:22:15 -0500 Subject: [PATCH 06/12] chore(fp-1652): a2cps: deprecate old tmpl paths Requires: TACC/Core-CMS#da85200 --- a2cps-cms/settings_custom.py | 12 ++++++++++-- a2cps-cms/templates/README.md | 8 ++++++++ a2cps-cms/templates/assets_custom.html | 4 ---- a2cps-cms/templates/fullwidth.html | 7 +------ a2cps-cms/templates/standard.html | 7 +------ a2cps-cms/templates/taccsite_cms/assets_custom.html | 9 +++++++++ 6 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 a2cps-cms/templates/README.md delete mode 100644 a2cps-cms/templates/assets_custom.html create mode 100644 a2cps-cms/templates/taccsite_cms/assets_custom.html diff --git a/a2cps-cms/settings_custom.py b/a2cps-cms/settings_custom.py index e3e25e0a..c273a970 100644 --- a/a2cps-cms/settings_custom.py +++ b/a2cps-cms/settings_custom.py @@ -8,8 +8,9 @@ ######################## CMS_TEMPLATES = ( - ('a2cps-cms/templates/standard.html', 'Standard'), - ('a2cps-cms/templates/fullwidth.html', 'Full Width'), + ('standard.html', 'Standard'), + ('fullwidth.html', 'Full Width'), + ('guide.html', 'Guide'), ('guides/getting_started.html', 'Guide: Getting Started'), ('guides/data_transfer.html', 'Guide: Data Transfer'), @@ -17,6 +18,13 @@ ('guides/portal_technology.html', 'Guide: Portal Technology Stack') ) +# Deprecated Templates +# TODO: FP-1645: Remove +CMS_TEMPLATES += [ + ('a2cps-cms/templates/standard.html', 'Standard'), + ('a2cps-cms/templates/fullwidth.html', 'Full Width'), +] + ######################## # TACC: LOGOS ######################## diff --git a/a2cps-cms/templates/README.md b/a2cps-cms/templates/README.md new file mode 100644 index 00000000..cbae904d --- /dev/null +++ b/a2cps-cms/templates/README.md @@ -0,0 +1,8 @@ +# TACC CMS Project - * - Templates + +The root-level Core override templates are deprecated. + +For standard Core override templates, see: + +- `./taccsite_custom/*` +- `../settings_custom.py` diff --git a/a2cps-cms/templates/assets_custom.html b/a2cps-cms/templates/assets_custom.html deleted file mode 100644 index 41b66bd2..00000000 --- a/a2cps-cms/templates/assets_custom.html +++ /dev/null @@ -1,4 +0,0 @@ -{% load static %} - - - diff --git a/a2cps-cms/templates/fullwidth.html b/a2cps-cms/templates/fullwidth.html index c0f92047..a38b994b 100644 --- a/a2cps-cms/templates/fullwidth.html +++ b/a2cps-cms/templates/fullwidth.html @@ -1,8 +1,3 @@ {% extends "fullwidth.html" %} -{% load cms_tags %} -{% block assets_custom %} - {{ block.super }} - - {% include "./assets_custom.html" %} -{% endblock assets_custom %} +{# DEPRECATED TEMPLATE #} diff --git a/a2cps-cms/templates/standard.html b/a2cps-cms/templates/standard.html index f1cf9e22..07162210 100644 --- a/a2cps-cms/templates/standard.html +++ b/a2cps-cms/templates/standard.html @@ -1,8 +1,3 @@ {% extends "standard.html" %} -{% load cms_tags %} -{% block assets_custom %} - {{ block.super }} - - {% include "./assets_custom.html" %} -{% endblock assets_custom %} +{# DEPRECATED TEMPLATE #} diff --git a/a2cps-cms/templates/taccsite_cms/assets_custom.html b/a2cps-cms/templates/taccsite_cms/assets_custom.html new file mode 100644 index 00000000..68d24f08 --- /dev/null +++ b/a2cps-cms/templates/taccsite_cms/assets_custom.html @@ -0,0 +1,9 @@ +{% extends "assets_custom.html" %} +{% load cms_tags static %} + +{% block assets %} + {{ block.super }} + + + +{% endblock assets %} From 4fab5f839182da73dfe4cd9289aa343e38010f22 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Mon, 23 May 2022 09:38:03 -0500 Subject: [PATCH 07/12] chore(fp-1652): frontera: deprecate old templates Requires: TACC/Core-CMS#da85200 --- frontera-cms/settings_custom.py | 6 +++--- frontera-cms/templates/README.md | 8 ++++++++ frontera-cms/templates/assets_custom.html | 2 ++ frontera-cms/templates/fullwidth.html | 2 ++ frontera-cms/templates/home.html | 4 +--- frontera-cms/templates/standard.html | 3 +++ .../templates/taccsite_cms/assets_custom.html | 8 ++++++++ frontera-cms/templates/taccsite_cms/fullwidth.html | 13 +++++++++++++ 8 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 frontera-cms/templates/README.md create mode 100644 frontera-cms/templates/taccsite_cms/assets_custom.html create mode 100644 frontera-cms/templates/taccsite_cms/fullwidth.html diff --git a/frontera-cms/settings_custom.py b/frontera-cms/settings_custom.py index aa3eef62..82a4c605 100644 --- a/frontera-cms/settings_custom.py +++ b/frontera-cms/settings_custom.py @@ -22,13 +22,13 @@ ('guides/portal_technology.html', 'Guide: Portal Technology Stack') ) -# FP-1645: Remove CMS_TEMPLATES_DEPRECATED -CMS_TEMPLATES_DEPRECATED = ( +# Deprecated Templates +# TODO: FP-1645: Remove +CMS_TEMPLATES += ( ('frontera-cms/templates/standard.html', 'DEPRECATED Standard'), ('frontera-cms/templates/fullwidth.html', 'DEPRECATED Full Width'), ('frontera-cms/templates/home.html', 'DEPRECATED Homepage'), ) -CMS_TEMPLATES += CMS_TEMPLATES_DEPRECATED ######################## # TACC: BRANDING diff --git a/frontera-cms/templates/README.md b/frontera-cms/templates/README.md new file mode 100644 index 00000000..cbae904d --- /dev/null +++ b/frontera-cms/templates/README.md @@ -0,0 +1,8 @@ +# TACC CMS Project - * - Templates + +The root-level Core override templates are deprecated. + +For standard Core override templates, see: + +- `./taccsite_custom/*` +- `../settings_custom.py` diff --git a/frontera-cms/templates/assets_custom.html b/frontera-cms/templates/assets_custom.html index f442c233..34c91a07 100644 --- a/frontera-cms/templates/assets_custom.html +++ b/frontera-cms/templates/assets_custom.html @@ -1,3 +1,5 @@ {% load static %} +{# DEPRECATED TEMPLATE #} + diff --git a/frontera-cms/templates/fullwidth.html b/frontera-cms/templates/fullwidth.html index 1fa0c518..bef0d371 100644 --- a/frontera-cms/templates/fullwidth.html +++ b/frontera-cms/templates/fullwidth.html @@ -1,6 +1,8 @@ {% extends "fullwidth.html" %} {% load cms_tags static %} +{# DEPRECATED TEMPLATE #} + {% block assets_custom %} {{ block.super }} diff --git a/frontera-cms/templates/home.html b/frontera-cms/templates/home.html index 3910d395..93a5b766 100644 --- a/frontera-cms/templates/home.html +++ b/frontera-cms/templates/home.html @@ -2,9 +2,7 @@ {% load cms_tags static %} {% block assets_custom %} - {{ block.super }} - - {% include "./assets_custom.html" %} + {% include "./taccsite_cms/assets_custom.html" %}