Skip to content

Commit

Permalink
chore: settings cleanup & match Core-CMS (#273)
Browse files Browse the repository at this point in the history
* style: consistent settings headers

* style: consistent settings headers (cont)

* style: settings headers & location match core

* chore(ecep): no _ settings

* chore(netsage): no _ nor unnecessary settings

* chore(tapis): no _ settings, add ldap setting

* chore(tapis): delete unused favicon

* chore(example): comment out CMS_TEMPLATES

These settings can use Core's. Only enable what should be changed.

* chore(ecep): remove unused templates

* chore(demdata): remove branding (css hides it)

The original, fast solution was to hide it with CSS.

Just setting BRANDING to False should have the same effect.

* style(apcd): add missing newline at end of file
  • Loading branch information
wesleyboar authored Feb 13, 2024
1 parent 4e20f90 commit a2109be
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 150 deletions.
5 changes: 2 additions & 3 deletions a2cps_cms/src/taccsite_cms/settings_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# TACC WMA CMS SITE:
# *.A2CPS.TACC.UTEXAS.EDU


########################
# DJANGO CMS SETTINGS
# DJANGO_CMS
########################

CMS_TEMPLATES = (
Expand All @@ -20,7 +19,7 @@
)

########################
# TACC: LOGOS
# TACC: LOGO & FAVICON
########################

LOGO = [
Expand Down
8 changes: 4 additions & 4 deletions apcd-cms/src/taccsite_cms/settings_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# *.APCD.TACC.UTEXAS.EDU

########################
# DJANGO (EMAIL)
# DJANGO: EMAIL
########################

# Set on server, NOT here
Expand All @@ -13,7 +13,7 @@
# DEFAULT_FROM_EMAIL = "..."

########################
# DJANGO CMS SETTINGS
# DJANGO_CMS
########################

CMS_TEMPLATES = (
Expand All @@ -27,7 +27,7 @@
)

########################
# TACC: LOGOS
# TACC: LOGO & FAVICON
########################

LOGO = [
Expand All @@ -43,4 +43,4 @@

FAVICON = {
"img_file_src": "apcd-cms/img/favicons/favicon.ico"
}
}
63 changes: 12 additions & 51 deletions demdata_cms/src/taccsite_cms/settings_custom.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
# CUSTOM SETTINGS VALUES.
# TACC WMA CMS SITE:
# *.DEMOCTRATIZING-SITE.TACC.UTEXAS.EDU
# https://democratizingdata.ai/

########################
# TACC: PORTAL
########################

# Does this CMS site have a portal (default value: True)?
INCLUDES_CORE_PORTAL = False
INCLUDES_PORTAL_NAV = False
INCLUDES_SEARCH_BAR = False

########################
# DJANGO CMS SETTINGS
# DJANGO_CMS
########################

CMS_TEMPLATES = (
('standard.html', 'Standard'),
('fullwidth.html', 'Full Width'),

('demdata_cms/templates/standard.html', 'Standard (with CSS from TUP)'),
('demdata_cms/templates/fullwidth.html', 'Full Width (with CSS from TUP)'),
('demdata-cms/templates/standard.html', 'DEPRECATED Standard (with CSS from TUP)'),
Expand All @@ -29,48 +20,10 @@
# TACC: BRANDING
########################

# LOOK INTO THIS SOLUTION.
# from taccsite_cms.settings import TACC_BRANDING, UTEXAS_BRANDING, NSF_BRANDING

TACC_BRANDING = [
"tacc",
"site_cms/img/org_logos/tacc-white.png",
"branding-tacc",
"https://www.tacc.utexas.edu/",
"_blank",
"TACC Logo",
"anonymous",
"True"
]

UTEXAS_BRANDING = [
"utexas",
"site_cms/img/org_logos/utaustin-white.png",
"branding-utaustin",
"https://www.utexas.edu/",
"_blank",
"University of Texas at Austin Logo",
"anonymous",
"True"
]

# NSF_BRANDING = [
# "nsf",
# "site_cms/img/org_logos/nsf-white.png",
# "branding-nsf",
# "https://www.nsf.gov/",
# "_blank",
# "NSF Logo",
# "anonymous",
# "True"
# ]

# BRANDING = [ TACC_BRANDING, UTEXAS_BRANDING, NSF_BRANDING ]
BRANDING = [ TACC_BRANDING, UTEXAS_BRANDING ] # this matches prod 2022
# BRANDING = [] # prod 2022 hides bar via snippet CSS but should also do this
BRANDING = False

########################
# TACC: LOGOS
# TACC: LOGO & FAVICON
########################

LOGO = [
Expand All @@ -88,6 +41,14 @@
"img_file_src": "demdata_cms/img/favicons/Favicon_64x64.svg"
}

########################
# TACC: PORTAL
########################

INCLUDES_CORE_PORTAL = False
INCLUDES_PORTAL_NAV = False
INCLUDES_SEARCH_BAR = False

########################
# TACC: CORE STYLES
########################
Expand Down
2 changes: 1 addition & 1 deletion ecep_cms/src/taccsite_cms/custom_app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ...

########################
# NEWS / BLOG
# DJANGOCMS_BLOG
########################

# 'filer', # already in Core
Expand Down
56 changes: 24 additions & 32 deletions ecep_cms/src/taccsite_cms/settings_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,30 @@
# 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

########################
# DJANGO CMS SETTINGS
# DJANGO_CMS
########################

CMS_TEMPLATES = (
('standard.html', 'Standard'),
('fullwidth.html', 'Full Width'),

('guide.html', 'Guide'),
('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')
)

########################
# TACC: SEARCH
########################

# Support Google search instead of Portal's Elasticsearch
SEARCH_PATH = '/site-search' # cuz Portal Nginx config hijacks /search
SEARCH_QUERY_PARAM_NAME = 'q' # as Google expects

########################
# TACC: BRANDING
########################

_NSF_BRANDING = [
# NOTE: Variables NSF_BRANDING, TACC_BRANDING, and UTEXAS_BRANDING are duplicated from Core-CMS cuz current infrastructure lacks ability to reference default values.

NSF_BRANDING = [
"nsf",
"site_cms/img/nsf-white.png",
"branding-nsf",
Expand All @@ -35,7 +36,7 @@
"True"
]

_TACC_BRANDING = [
TACC_BRANDING = [
"tacc",
"site_cms/img/tacc-white.png",
"branding-tacc",
Expand All @@ -46,7 +47,7 @@
"True"
]

_UTEXAS_BRANDING = [
UTEXAS_BRANDING = [
"utexas",
"site_cms/img/utaustin-white.png",
"branding-utaustin",
Expand All @@ -57,10 +58,10 @@
"True"
]

BRANDING = [_NSF_BRANDING, _TACC_BRANDING, _UTEXAS_BRANDING]
BRANDING = [ NSF_BRANDING, TACC_BRANDING, UTEXAS_BRANDING ]

########################
# TACC: LOGOS
# TACC: LOGO & FAVICON
########################

LOGO = [
Expand All @@ -78,14 +79,6 @@
"img_file_src": "ecep_cms/img/favicon.ico"
}

########################
# TACC: SEARCH
########################

# Support Google search instead of Portal's Elasticsearch
SEARCH_PATH = '/site-search' # cuz Portal Nginx config hijacks /search
SEARCH_QUERY_PARAM_NAME = 'q' # as Google expects

########################
# TACC: PORTAL
########################
Expand All @@ -95,15 +88,7 @@
INCLUDES_SEARCH_BAR = True

########################
# TACC: NEWS/BLOG
########################

# TACC settings
TACC_BLOG_SHOW_CATEGORIES = False
TACC_BLOG_SHOW_TAGS = False

########################
# NEWS / BLOG
# DJANGOCMS_BLOG
########################

# REQ: Assumes various "NEWS / BLOG" are installed via `custom_app_settings.py`
Expand All @@ -128,6 +113,13 @@
# Miscellaneous settings
BLOG_ENABLE_COMMENTS = False

########################
# DJANGOCMS_BLOG: TACC
########################

TACC_BLOG_SHOW_CATEGORIES = False
TACC_BLOG_SHOW_TAGS = False

########################
# TACC: CORE STYLES
########################
Expand Down
17 changes: 10 additions & 7 deletions example_cms/src/taccsite_cms/settings_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# *.PROJECT_DOMAIN.TACC.UTEXAS.EDU

########################
# DJANGO (EMAIL)
# DJANGO: EMAIL
########################

# Set on server, NOT here
Expand All @@ -13,13 +13,16 @@
# DEFAULT_FROM_EMAIL = "..."

########################
# DJANGO CMS SETTINGS
# DJANGO_CMS
########################

CMS_TEMPLATES = (
('standard.html', 'Standard'),
('fullwidth.html', 'Full Width'),
)
# CMS_TEMPLATES = (
# ('standard.html', 'Standard'),
# ('fullwidth.html', 'Full Width'),

# ('guide.html', 'Guide'),
# ('guides/portal_technology.html', 'Guide: Portal Technology Stack'),
# }

########################
# TACC: BRANDING
Expand All @@ -41,7 +44,7 @@
# BRANDING = [ TACC_BRANDING, UTEXAS_BRANDING, NSF_BRANDING, _CUSTOM_BRANDING ]

########################
# TACC: LOGOS
# TACC: LOGO & FAVICON
########################

LOGO = [
Expand Down
6 changes: 3 additions & 3 deletions matcssi_cms/src/taccsite_cms/settings_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# *.MISE.TACC.UTEXAS.EDU

########################
# DJANGO (EMAIL)
# DJANGO: EMAIL
########################

# Set on server, NOT here
Expand All @@ -13,7 +13,7 @@
# DEFAULT_FROM_EMAIL = "..."

########################
# TACC: LOGOS
# TACC: LOGO & FAVICON
########################

LOGO = [
Expand All @@ -29,4 +29,4 @@

FAVICON = {
"img_file_src": "matcssi_cms/img/favicons/favicon.ico"
}
}
Loading

0 comments on commit a2109be

Please sign in to comment.