Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/fp 1652 template load order #492

Closed
wants to merge 14 commits into from

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented May 20, 2022

To Do

  • Try to not change base settings to settings_custom.
  • Consider piecemeal solutions.
  • Testing
  • Screenshots (or deploys)

Overview

To install apps and load templates the order Django CMS expects:

  1. TACC CMS custom (e.g. Frontera)
  2. TACC CMS base (i.e. Core)
  3. CMS Blog app

Related

Changes

  1. [feature] pass project name to cms container as env var
  2. [warning] load settings_custom instead of settings ⚠️
  3. [enhancement] extract template directory paths to a script
  4. [feature] create and use tacc variables for custom project path
  5. [feature] fix template inheritance
    • [enhancement] allow core cms to properly override 3rd-party apps
    • [feature] allow custom cms to overwrite core cms and 3rd-party apps
  6. [warning] require custom app to load settings_local ⚠️
  7. [chore] simplify blog install syntax
  8. [docs] update templates/README
  9. [chore] fix/simplify blog template tweak
  10. [chore] (submod: texascale, ecep) simplify blog install syntax

⚠️ This undesirably requires settings_custom to run CMS. I may be able to revert this change safely, because it may have been a part a fix that is actually not necessary.

Testing

Screenshots

Notes

The annual benefit (minor) is to support custom Texascale blog styles each year.

This is a small part of FP-1439.

The occasional benefit (convenience) is overriding a Core template without editing settings_custom.

This is performed here via TACC/Core-CMS-Resources#142.

The onboarding benefit (standardization) is relying on Django template inheritance.

The previous template customization method was template replacement.

- refactor template dir load order
- default to load settings_custom, not settings
- load installed apps in appropriate location
- fix template inheritence (core: blog)
- fix template inheritence (texascale, ecep)

Caveat: project defined manually (env var not available yet)
BREAKING CHANGE: load settings_custom by default, not settings
core stopped loading it, so custom projects must

this is not a desirable change; expect revisit
@wesleyboar
Copy link
Member Author

wesleyboar commented Aug 29, 2023

Abandoned because this is so out-of-date (many merge conflicts) and because https://github.com/TACC/Core-CMS-Custom relies on overwriting templates. Rather than fight that in favor of template inheritance (which I have failed to make work for three years), I abandon template inheritance.

@wesleyboar wesleyboar closed this Aug 29, 2023
@wesleyboar
Copy link
Member Author

Replaced by #710.

@wesleyboar wesleyboar deleted the bugfix/fp-1652-template-load-order branch November 13, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working paused Started but not actively in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant