- Rename the
FAVICON
dict toPORTAL_FAVICON
. - Add a key/value pair to the
PORTAL_FAVICON
.
- FAVICON = {
- "img_file_src": "site_cms/img/favicons/favicon.ico"
+ PORTAL_FAVICON = {
+ "img_file_src": "site_cms/img/favicons/favicon.ico",
+ "is_remote": False,
}
Refactor the LOGO
array to a PORTAL_LOGO
dict:
- LOGO = [
- "portal",
- "site_cms/img/org_logos/portal.png",
- "",
- "/",
- "_self",
- "Portal Logo",
- "anonymous",
- "True"
- ]
+ PORTAL_LOGO = {
+ "is_remote": False,
+ "img_file_src": "site_cms/img/org_logos/portal.png",
+ "img_class": "", # additional class names
+ "link_href": "/",
+ "link_target": "_self",
+ "img_alt_text": "Portal Logo",
+ "img_crossorigin": "anonymous",
+ } # To hide logo, set `PORTAL_LOGO = False`
Map of Array Values to Dict Properties
from Array Value | to Dict Property | |
---|---|---|
0 | "portal" | (unused value) |
1 | "site_cms/.../portal.png" | "img_file_src" |
2 | "" | "img_class" |
3 | "/" | "link_href" |
4 | "_self" | "link_target" |
5 | "Portal Logo" | "img_alt_text" |
6 | "anonymous" | "img_crossorigin" |
7 | "True" | (whether to show logo) |
- Use Postgres is v14.9 or greater. You may assume all TACC sites do.
- Update code that uses features removed in Django 4 e.g.
django.conf.urls.url()
django.utils.encoding.force_text()
django.utils.translation.ugettext...
- Bookmark backwards incompatible changes in Django 4.
- Deploy and test.
Given a … Then … Deployed Website Follow How To Build & Deploy a CMS Website. Local Instance Follow Update Project instructions. (Assume everything changed.)
If your custom project directory name has dashes, e.g.
taccsite_custom/custom-project-dir
Then:
- Rename all
custom-project-dir
directories tocustom_project_dir
. - Update all
custom-project-dir
references tocustom_project_dir
.
Important A custom project directory name is a Django application. A Django application name must be "a valid Python identifier".
If your custom project directory has any templates/*.html
e.g.
taccsite_custom/custom_project_dir/templates/standard.html
taccsite_custom/custom_project_dir/templates/fullwidth.html
taccsite_custom/custom_project_dir/templates/home.html
Then:
-
Copy the templates to become deprecated templates:
- from
custom_project_dir/templates
- to
custom-project-dir/templates
Warning The name
custom-project-dir
must match the old name as it was, including dashes. - from
-
Edit the deprecated templates to extend the new templates e.g.
{% extends "custom_project_dir/templates/standard.html" %}
-
Update
settings_custom.py
to support deprecated templates:('custom_project_dir/templates/standard.html', 'Standard'), ('custom_project_dir/templates/fullwidth.html', 'Full Width'), + ('custom-project-dir/templates/standard.html', 'DEPRECATED Standard'), + ('custom-project-dir/templates/fullwidth.html', 'DEPRECATED Full Width'),
Follow How To Build & Deploy a CMS Website.
Follow Update Project instructions. (Assume everything changed.)
- Change template of every page on the CMS to not use deprecated template.
- Remove its deprecated templates from repository.
Undocumented. Contact a primary contributor for assistance.