TACC / Core-CMS

The Core CMS codebase used by TACC Portals.
https://cep.tacc.utexas.edu
2 stars 1 forks source link

settings_local & setting_custom Not Working #849

Closed wesleyboar closed 3 months ago

wesleyboar commented 3 months ago

Overview

Settings in settings_local.py and settings_custom.py have no effect.

Steps

  1. Run local instance of TACC/Core-CMS.
  2. Have a settings_local.py with SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error'].
  3. Watch logs of core_cms container.

Expected

```log core_cms | ERRORS: core_cms | ?: (captcha.recaptcha_test_key_error) RECAPTCHA_PRIVATE_KEY or RECAPTCHA_PUBLIC_KEY is making use of the Google test keys and will not behave as expected in a production environment core_cms | HINT: Update settings.RECAPTCHA_PRIVATE_KEY and/or settings.RECAPTCHA_PUBLIC_KEY. Alternatively this check can be ignored by adding `SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']` to your settings file. core_cms | core_cms | System check identified 1 issue (0 silenced). core_cms | [DJANGO] INFO 2024-07-16 12:12:09,113 UTC autoreload django.utils.autoreload.trigger_reload:266: /code/taccsite_cms/settings.py changed, reloading. core_cms | [DJANGO] INFO 2024-07-16 12:12:09,916 UTC autoreload django.utils.autoreload.run_with_reloader:668: Watching for file changes with StatReloader core_cms | Performing system checks... core_cms | core_cms | System check identified no issues (1 silenced). ```

Actual

System check identified 1 issue (0 silenced).

```log core_cms | ERRORS: core_cms | ?: (captcha.recaptcha_test_key_error) RECAPTCHA_PRIVATE_KEY or RECAPTCHA_PUBLIC_KEY is making use of the Google test keys and will not behave as expected in a production environment core_cms | HINT: Update settings.RECAPTCHA_PRIVATE_KEY and/or settings.RECAPTCHA_PUBLIC_KEY. Alternatively this check can be ignored by adding `SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']` to your settings file. core_cms | core_cms | System check identified 1 issue (0 silenced). ```

Notes

Alternative Test

Add TACC_CORE_STYLES_VERSION = 0 and notice that core-styles.*.css (i.e. version 2) are loaded instead of site.css.

wesleyboar commented 3 months ago

[!IMPORTANT] User error.

I had — 

from taccsite_cms._settings.branding import *

PORTAL_BRANDING = [ PORTAL_BRANDING_NSF, PORTAL_BRANDING_UTEXAS, PORTAL_BRANDING_TACC ]

— in my settings, but that file that is not available (until #841).