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

feat!: rename directories, "-" → "_" (for django 3) #176

Merged
merged 21 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
51036b3
feat: rename example-cms to example_cms
wesleyboar Apr 22, 2023
ce6c1a8
feat: rename …-cms to …_cms
wesleyboar May 1, 2023
b5cd842
feat: rename …-org to …_org
wesleyboar May 1, 2023
a7e44ef
feat!: rename paths to templates
wesleyboar May 1, 2023
f3356ee
fix: django 3.0 staticfiles deprecated, use static
wesleyboar May 1, 2023
edd3858
Merge branch 'main' into django/2to3
wesleyboar May 8, 2023
4238649
Merge branch 'main' into django/2to3
wesleyboar May 10, 2023
71cb0c9
Merge branch 'main' into django/2to3
wesleyboar May 22, 2023
05203e1
Merge branch 'main' into django/2to3
wesleyboar May 23, 2023
043869d
fix(brainmap-cms): move template to _ dir
wesleyboar May 23, 2023
cb19e7d
fix(lccf_cms): rename static subdir to lccf_cms
wesleyboar May 24, 2023
aae497e
fix(brainmap_cms): missing - to _ renames in code
wesleyboar May 24, 2023
a29750e
Merge branch 'main' into django/2to3
wesleyboar Jun 16, 2023
19661d8
feat(demdata_cms): delete a.k.a. migrate to core-cms-custom (#173)
wesleyboar Jun 22, 2023
f9d3211
Merge branch 'main' into django/2to3
wesleyboar Jun 23, 2023
cfa511e
Merge branch 'main' into django/2to3
wesleyboar Jun 23, 2023
5005db2
Merge branch 'main' into django/2to3
wesleyboar Jul 13, 2023
9c7e24e
chore: remove migrated projects
wesleyboar Jul 13, 2023
5926694
docs: change dash to underscore
wesleyboar Jul 18, 2023
57d0cb6
docs: add warning about deploy, require migration
wesleyboar Jul 18, 2023
2d60d3a
docs: note migrated sites (premature, but soon)
wesleyboar Jul 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ The project-specific CMS code for TACC WMA Workspace Websites.

To add resources for a new project:

1. Clone `/example-cms`.
2. Read `/_readme-cms`.
1. Clone `/example_cms`.
2. Read `/_readme_cms`.

To build such a CMS project, use [TACC/Core-CMS](https://github.com/TACC/Core-CMS).

> **Warning**
> Do **not** deploy these websites via this repository with [TACC/Core-CMS#v3.12.0](https://github.com/TACC/Core-CMS/releases/tag/v3.12.0) or greater. **Instead**, migrate them to [Core CMS Custom].[^1]

## Related Repositories

- [Camino], a Docker container-based deployment scheme
- [Core CMS], the base CMS code for TACC WMA CMS Websites
- [Core CMS Custom], the custom CMS code (new solution) for TACC WMA CMS Websites


## Intended Usage
Expand All @@ -27,19 +30,23 @@ Please see the [Core CMS README].

## Websites Maintained

- https://prod.a2cps.tacc.utexas.edu/
- https://prod.a2cps.tacc.utexas.edu/ a.k.a. https://a2cps.org/<br />
<sup>code has moved to https://github.com/TACC/Core-CMS-Custom/blob/main/a2cps_cms/</sup>
- https://prod.apcd.tacc.utexas.edu/ a.k.a. https://txapcd.org/<br />
<sup>code has moved to https://github.com/TACC/Core-CMS-Custom/blob/main/apcd-cms/</sup>
<sup>code has moved to https://github.com/TACC/Core-CMS-Custom/blob/main/apcd_cms/</sup>
- https://portal.brainmap.org/
- https://democratizingdata.ai/
- https://prod.ecep.tacc.utexas.edu/ a.k.a. https://ecepalliance.org/
- https://democratizingdata.ai/<br />
<sup>code has moved to https://github.com/TACC/Core-CMS-Custom/blob/main/apcd_cms/</sup>
- https://prod.ecep.tacc.utexas.edu/ a.k.a. https://ecepalliance.org/<br />
<sup>code has moved to https://github.com/TACC/Core-CMS-Custom/blob/main/ecep_cms/</sup>
- https://prod.epoc.tacc.utexas.edu/
- https://frontera-portal.tacc.utexas.edu/
- https://lccf.tacc.utexas.edu/
- https://3dem.org/
- https://prod.protx.tacc.utexas.edu/
- https://prod.sciviscolor.tacc.utexas.edu/
- https://tapis-project.org/
- https://tapis-project.org/<br />
<sup>code has moved to https://github.com/TACC/Core-CMS-Custom/blob/main/tapisproject_cms/</sup>
- https://texascale.org/
- https://dev.tup.tacc.utexas.edu/<br />
<sup>code has moved to https://github.com/TACC/tup-ui/blob/main/apps/tup-cms/</sup>
Expand All @@ -49,5 +56,8 @@ Please see the [Core CMS README].

[Core CMS]: https://github.com/TACC/Core-CMS
[Core Styles]: https://github.com/TACC/Core-Styles
[Core CMS Custom]: https://github.com/TACC/Core-CMS-Custom
[Core CMS README]: https://github.com/TACC/Core-CMS/blob/main/README.md
[Camino]: https://github.com/TACC/Camino

[^1]: [Websites with custom templates will experience a major problem.](https://github.com/TACC/Core-CMS-Resources/pull/176#issuecomment-1603194690) Even though not all websites have such templates **and** there is a [tested solution](https://github.com/TACC/Core-CMS-Resources/pull/176#issuecomment-1603215969), website development benefits so much from migration, that every opportunity is taken to encourage it.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Otherwise, they will be unavailable to [Core CMS] loading this project.

## Directory Hierarchy

Where `name-of-project` is a CMS projects with custom static assets:
Where `name_of_project` is a CMS projects with custom static assets:

- `/name-of-project/static/name-of-project/...`
- `/name_of_project/static/name_of_project/...`

The redundancy is intentional:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ This consistency lets us override templates in Django fashion.

## How to Write Template Path

Where `name-of-project` is a CMS projects with custom templates:
Where `name_of_project` is a CMS projects with custom templates:

- `/name-of-project/templates/___.html`
- `/name_of_project/templates/___.html`

### How to Overwrite Core Templates

Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions a2cps-cms/settings_custom.py → a2cps_cms/settings_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
########################

CMS_TEMPLATES = (
('a2cps-cms/templates/standard.html', 'Standard'),
('a2cps-cms/templates/fullwidth.html', 'Full Width'),
('a2cps_cms/templates/standard.html', 'Standard'),
('a2cps_cms/templates/fullwidth.html', 'Full Width'),
('guide.html', 'Guide'),
('guides/getting_started.html', 'Guide: Getting Started'),
('guides/data_transfer.html', 'Guide: Data Transfer'),
Expand All @@ -23,7 +23,7 @@

LOGO = [
"a2cps",
"a2cps-cms/img/org_logos/a2cps.png",
"a2cps_cms/img/org_logos/a2cps.png",
"",
"/",
"_self",
Expand All @@ -33,5 +33,5 @@
]

FAVICON = {
"img_file_src": "a2cps-cms/img/org_logos/favicon.ico"
"img_file_src": "a2cps_cms/img/org_logos/favicon.ico"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load static %}

<!-- To style old CMS content on new CMS -->
<link rel="stylesheet" href="{% static 'a2cps-cms/css/build/migrate.v1_v2.css' %}">
<link rel="stylesheet" href="{% static 'a2cps_cms/css/build/migrate.v1_v2.css' %}">
File renamed without changes.
wesleyboar marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filenames do not matter.

The directories that matter are apps, and directories named identical to apps, like …/texascale_org and …/texascale_org/static/texascale_org

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've answered all the similar questions here, and resolved those similar questions' comments. If I have done so in error, please feel free to unresolve them and direct me to look closer.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

_UTHSCSA_BRANDING = [
"uthscsa",
"brainmap-cms/img/org_logos/uthscsa-logo-white.png",
"brainmap_cms/img/org_logos/uthscsa-logo-white.png",
"branding-logo--short",
"https://www.uthscsa.edu/",
"_blank",
Expand All @@ -36,7 +36,7 @@

_SGCI_BRANDING = [
"sgci",
"brainmap-cms/img/org_logos/sgci-logo-sans-text.svg",
"brainmap_cms/img/org_logos/sgci-logo-sans-text.svg",
"branding-logo--short",
"https://sciencegateways.org/",
"_blank",
Expand Down Expand Up @@ -75,7 +75,7 @@

LOGO = [
"brainmap",
"brainmap-cms/img/org_logos/brainmap-logo--light-text-trans-bkgd--large-text.svg",
"brainmap_cms/img/org_logos/brainmap-logo--light-text-trans-bkgd--large-text.svg",
"",
"/",
"_self",
Expand All @@ -85,5 +85,5 @@
]

FAVICON = {
"img_file_src": "brainmap-cms/img/org_logos/brainmap-logo--dark-text-trans-bkgd--icon-only.png"
"img_file_src": "brainmap_cms/img/org_logos/brainmap-logo--dark-text-trans-bkgd--icon-only.png"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles %}

{# TODO: FP-1652: Move to template that extends core_cms one #}
<link rel="stylesheet" href="{% static 'brainmap-cms/css/build/site.css' %}">
<link rel="stylesheet" href="{% static 'brainmap_cms/css/build/site.css' %}">
File renamed without changes.
6 changes: 3 additions & 3 deletions ecep-cms/settings_custom.py → ecep_cms/settings_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

LOGO = [
"ecep",
"ecep-cms/img/org_logos/ecep-white-no_words.svg",
"ecep_cms/img/org_logos/ecep-white-no_words.svg",
"",
"/",
"_self",
Expand All @@ -75,7 +75,7 @@
]

FAVICON = {
"img_file_src": "ecep-cms/img/org_logos/favicon.ico"
"img_file_src": "ecep_cms/img/org_logos/favicon.ico"
}

########################
Expand Down Expand Up @@ -143,4 +143,4 @@
# CLIENT BUILD SETTINGS
########################

ROOT_URLCONF = 'taccsite_custom.ecep-cms.urls'
ROOT_URLCONF = 'taccsite_custom.ecep_cms.urls'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}

{# TODO: FP-1487: Move this to a templates/*.html that extends a site_cms one #}
<link rel="stylesheet" href="{% static 'ecep-cms/css/build/site.css' %}">
<link rel="stylesheet" href="{% static 'ecep_cms/css/build/site.css' %}">
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions epoc-cms/settings_custom.py → epoc_cms/settings_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
# WALKTHROUGH
########################

# To change LDAP auth settings for a custom CMS Project (e.g. `epoc-cms`):
# To change LDAP auth settings for a custom CMS Project (e.g. `epoc_cms`):
# 1. Copy the setting from `settings.py`
# 2. Assign the new value in `Core-CMS/taccsite_custom/epoc-cms/settings_custom.py`.
# 2. Assign the new value in `Core-CMS/taccsite_custom/epoc_cms/settings_custom.py`.
AUTH_LDAP_SERVER_URI = "ldap://cluster.ldap.tacc.utexas.edu"

# The same goes for other more commonly customized values like below.
Expand Down Expand Up @@ -68,7 +68,7 @@

TACC_BRANDING = [
"tacc",
"epoc-cms/img/org_logos/tacc-white.png",
"epoc_cms/img/org_logos/tacc-white.png",
"branding-tacc",
"https://www.tacc.utexas.edu/",
"_blank",
Expand All @@ -79,7 +79,7 @@

UTEXAS_BRANDING = [
"utexas",
"epoc-cms/img/org_logos/utaustin-white.png",
"epoc_cms/img/org_logos/utaustin-white.png",
"branding-utaustin",
"https://www.utexas.edu/",
"_blank",
Expand All @@ -90,7 +90,7 @@

NSF_BRANDING = [
"nsf",
"epoc-cms/img/org_logos/nsf-white.png",
"epoc_cms/img/org_logos/nsf-white.png",
"branding-nsf",
"https://www.nsf.gov/",
"_blank",
Expand All @@ -101,7 +101,7 @@

CUSTOM_BRANDING = [
"epoc",
"epoc-cms/img/org_logos/esnet-white-logo.png",
"epoc_cms/img/org_logos/esnet-white-logo.png",
"branding-logo--short",
"https://www.es.net/",
"_blank",
Expand All @@ -118,7 +118,7 @@

LOGO = [
"epoc",
"epoc-cms/img/org_logos/epoc-color-logo.png",
"epoc_cms/img/org_logos/epoc-color-logo.png",
"",
"/",
"_self",
Expand All @@ -128,5 +128,5 @@
]

FAVICON = {
"img_file_src": "epoc-cms/img/org_logos/favicon.ico"
"img_file_src": "epoc_cms/img/org_logos/favicon.ico"
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#
# _CUSTOM_BRANDING = [
# "example",
# "example-cms/img/org_logos/example-logo.png",
# "example_cms/img/org_logos/example-logo.png",
# "",
# "https://example.com",
# "_blank",
Expand All @@ -47,7 +47,7 @@

LOGO = [
"example",
"example-cms/img/org_logos/portal.png",
"example_cms/img/org_logos/portal.png",
"",
"/",
"_self",
Expand Down
3 changes: 0 additions & 3 deletions frontera-cms/templates/assets_custom.html

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
########################

CMS_TEMPLATES = (
('frontera-cms/templates/standard.html', 'Standard'),
('frontera-cms/templates/fullwidth.html', 'Full Width'),
('frontera-cms/templates/home.html', 'Homepage'),
('frontera_cms/templates/standard.html', 'Standard'),
('frontera_cms/templates/fullwidth.html', 'Full Width'),
('frontera_cms/templates/home.html', 'Homepage'),

('guide.html', 'Guide'),
('guides/getting_started.html', 'Guide: Getting Started'),
Expand All @@ -38,7 +38,7 @@

_FRONTERA_TACC_BRANDING = [
"tacc",
"frontera-cms/img/org_logos/tacc-white.png", # TACC/Core-CMS#283 & #284
"frontera_cms/img/org_logos/tacc-white.png", # TACC/Core-CMS#283 & #284
"branding-tacc",
"https://www.tacc.utexas.edu/",
"_blank",
Expand Down Expand Up @@ -66,7 +66,7 @@

LOGO = [
"frontera",
"frontera-cms/img/org_logos/frontera-white-solo.png",
"frontera_cms/img/org_logos/frontera-white-solo.png",
"",
"/",
"_self",
Expand All @@ -76,5 +76,5 @@
]

FAVICON = {
"img_file_src": "frontera-cms/img/org_logos/favicon.ico"
"img_file_src": "frontera_cms/img/org_logos/favicon.ico"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ SRC: https://bitbucket.org/taccaci/frontera/src/master/client/css/frontera.scss
/* FAQ: Though CMS default font is `Benton Sans`, old content uses these */
@font-face {
font-family: BentonSansBold;
src: url("/static/frontera-cms/fonts/archive/BentonSans-Bold.otf");
src: url("/static/frontera_cms/fonts/archive/BentonSans-Bold.otf");
}

@font-face {
font-family: BentonSansMedium;
src: url("/static/frontera-cms/fonts/archive/BentonSans-Medium.otf");
src: url("/static/frontera_cms/fonts/archive/BentonSans-Medium.otf");
}

@font-face {
font-family: BentonSansItalic;
src: url("/static/frontera-cms/fonts/archive/BentonSans-MediumItalic.otf");
src: url("/static/frontera_cms/fonts/archive/BentonSans-MediumItalic.otf");
}

/* … */

/* HELP: Wesley assumes that old content uses these… but where? */
@font-face {
font-family: 'icon-worksregular';
src: url('/static/frontera-cms/fonts/archive/icon-works-webfont.eot');
src: url('/static/frontera-cms/fonts/archive/icon-works-webfont.eot?#iefix') format('embedded-opentype'),
url('/static/frontera-cms/fonts/archive/icon-works-webfont.woff') format('woff'),
url('/static/frontera-cms/fonts/archive/icon-works-webfont.svg#icon-worksregular') format('svg');
src: url('/static/frontera_cms/fonts/archive/icon-works-webfont.eot');
src: url('/static/frontera_cms/fonts/archive/icon-works-webfont.eot?#iefix') format('embedded-opentype'),
url('/static/frontera_cms/fonts/archive/icon-works-webfont.woff') format('woff'),
url('/static/frontera_cms/fonts/archive/icon-works-webfont.svg#icon-worksregular') format('svg');
font-weight: normal;
font-style: normal;
}
Expand Down
3 changes: 3 additions & 0 deletions frontera_cms/templates/assets_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% load static %}

<link rel="stylesheet" href="{% static 'frontera_cms/css/build/site.css' %}">
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
- Frontera was tested with this load order (so let it lie)
- Frontera is being redesigned (which will obviate this stylesheet)
-->
<link rel="stylesheet" href="{% static 'frontera-cms/css/build/migrate.v1_v2.css' %}">
<link rel="stylesheet" href="{% static 'frontera_cms/css/build/migrate.v1_v2.css' %}">
{% endblock assets_custom %}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
html { font-size: 62.5%; /* 1rem = 10px */ }
</style>

<link rel="stylesheet" href="{% static 'frontera-cms/css/build/template.home.css' %}">
<link rel="stylesheet" href="{% static 'frontera_cms/css/build/template.home.css' %}">
{% endblock assets_custom %}

{# FAQ: Common practice but unused, and template is unnecessary long-term #}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
########################

CMS_TEMPLATES = (
('neuronex-cms/templates/fullwidth.html', 'Fullwidth'),
('neuronex_cms/templates/fullwidth.html', 'Fullwidth'),
('home_portal.html', 'Standard Portal Homepage'),
('guide.html', 'Guide'),
('guides/getting_started.html', 'Guide: Getting Started'),
Expand Down Expand Up @@ -64,7 +64,7 @@

LOGO = [
"portal",
"neuronex-cms/img/org_logos/logo.3dem.png",
"neuronex_cms/img/org_logos/logo.3dem.png",
"",
"/",
"_self",
Expand All @@ -74,5 +74,5 @@
]

FAVICON = {
"img_file_src": "neuronex-cms/img/org_logos/favicon.ico"
"img_file_src": "neuronex_cms/img/org_logos/favicon.ico"
}