Skip to content

Commit

Permalink
feat: WI-71 remove/migrate settings_custom.py (#278)
Browse files Browse the repository at this point in the history
* feat: WI-71 remove/migrate settings_custom.py

* feat: WI-71 restore empty taccsite_cms dirs

* docs(netsage): fix inaccurate CMS tag comment

* feat(ptdatax): remove build workflow

no need, it just houses assets

* docs: WI-71 settings_custom from Core-Portal-Deployments

* ci: WI-71 ignore settings_custom
  • Loading branch information
wesleyboar authored Mar 21, 2024
1 parent eaca587 commit 1d97161
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 602 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/ptdatax-cms.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
.DS_Store

# ignore secrets & settings
## so dev learns those should not be committed in this repo
*secrets.py
*settings_secret.py
*settings_custom.py
*settings_local.py

# no node modules
Expand Down
3 changes: 3 additions & 0 deletions a2cps_cms/src/taccsite_cms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `taccsite_cms/`

Add files to overwrite those in this directory within [Core-CMS](https://github.com/TACC/Core-CMS).
38 changes: 0 additions & 38 deletions a2cps_cms/src/taccsite_cms/settings_custom.py

This file was deleted.

46 changes: 0 additions & 46 deletions apcd-cms/src/taccsite_cms/settings_custom.py

This file was deleted.

3 changes: 3 additions & 0 deletions demdata_cms/src/taccsite_cms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `taccsite_cms/`

Add files to overwrite those in this directory within [Core-CMS](https://github.com/TACC/Core-CMS).
57 changes: 0 additions & 57 deletions demdata_cms/src/taccsite_cms/settings_custom.py

This file was deleted.

8 changes: 6 additions & 2 deletions docs/develop-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ Read [Django CMS User Guide] for CMS user instructions.

## Customize Project

Edit `./src/taccsite_cms/settings_custom.py`.
| Purpose | File to Update |
| - | - |
| Test | `/custom_project_dir/src/taccsite_cms/settings_custom.py` |
| Commit | [TACC/Core-Portal-Deployments][Core Portal Deployments]:`/project_dir/camino/settings_custom.py` |

To know what settings are available, see [Core-CMS `settings.py`](https://github.com/TACC/Core-CMS/blob/main/taccsite_cms/settings.py).
To know what settings are available, see [TACC/Core-CMS:`/taccsite_cms/settings.py`](https://github.com/TACC/Core-CMS/blob/main/taccsite_cms/settings.py).

The settings usually edited are `LOGO` and `..._BRANDING`.

Expand Down Expand Up @@ -72,6 +75,7 @@ If there is a change that should be made in all CMS projects, consider whether i
[Core CMS]: https://github.com/TACC/Core-CMS
[Core Portal]: https://github.com/TACC/Core-Portal
[Core Styles]: https://github.com/TACC/Core-Styles
[Core Portal Deployments]: https://github.com/TACC/Core-Portal-Deployments

[TACC UI Patterns]: https://tacc.utexas.edu/static/ui/

Expand Down
28 changes: 20 additions & 8 deletions docs/port-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,27 @@ Follow steps in [Create a New Project](./develop-project.md#create-a-new-project

<details><summary>Reminders</summary>

1. From [Core CMS Resources] `/taccsite_custom/custom_project_dir`.\
To `/custom_project_dir/src/taccsite_custom/custom_project_dir`.
1. | Move | Content |
| - | - |
| From | [Core CMS Resources] `/taccsite_custom/custom_project_dir`. |
| To | `/custom_project_dir/src/taccsite_custom/custom_project_dir` |

2. From `/taccsite_custom/custom_project_dir/settings_custom.py`.\
To `/custom_project_dir/src/taccsite_cms/settings_custom.py`.
2. | Copy | Settings |
| - | - |
| From | [TACC/Core-Portal-Deployments][Core Portal Deployments]:`/project_dir/camino/settings_custom.py`. |
| To | `/custom_project_dir/src/taccsite_cms/settings_custom.py`.[^1] |

3. The name `custom_project_dir` **must** use underscores, **not** dashes.
3. | Use | Not |
| - | - |
| `custom_project_dir` | `custom-project-dir` |

> **Important**
> A valid Python application uses underscores.
</details>

[^1]: The `cms.settings_custom.py` is committed in [Core Portal Deployments]. A `settings_custom.py` in [Core CMS Custom] is `.gitignore`'d.

### Migrate Project to [Core CMS] v3.12

Follow [Core CMS: Upgrade Project: from v3.N to v3.12](https://github.com/TACC/Core-CMS/blob/main/docs/upgrade-project.md#from-v3n-to-v312).
Expand All @@ -55,9 +63,13 @@ Follow [Core CMS: Upgrade Project: from v3.N to v3.12](https://github.com/TACC/C
Then:

1. You must edit [Core Portal Deployments].
2. Edit `custom_project_dir/camino/___.settings_custom.py` (not `___.cms.…`).
3. Change `_PORTAL_ICON_FILENAME` to:\
`/static/` + ( the `img_file_src` of `FAVICON` )
2. Edit Portal settings for the appropriate server.\
<sup>E.g. `project_dir/camino/___.settings_custom.py` where `___` is `dev`, `pprd`, `prod` as appropriate (**not** `cms`).</sup>
3. Update `_PORTAL_ICON_FILENAME`:
| if `is_remote` is | then set value to |
| - | - |
| `False` | `/static/` **+** the `img_file_src` of `FAVICON` |
| `True` | the `img_file_src` of `FAVICON` |

#### Expects CSS Build Step

Expand Down
6 changes: 5 additions & 1 deletion docs/upgrade-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ Simplify image paths.
| to | `taccsite_custom/static/custom_project_dir/img/...` |

2. Rename **all** references to the previous image paths e.g.
- in `settings_custom.py`
- `/custom_project_dir/taccsite_cms/settings_custom.py` [^1]
- [Core Portal Deployments]:`/project_dir/camino/cms.settings_custom.py` [^1]

[^1]: The `cms.settings_custom.py` is committed in [Core Portal Deployments]. A `settings_custom.py` in [Core CMS Custom] is `.gitignore`'d.

<!-- Link Aliases -->

[Core CMS]: https://github.com/TACC/Core-CMS
[Core CMS Custom]: https://github.com/TACC/Core-CMS-Custom
[Core Portal Deployments]: https://github.com/TACC/Core-Portal-Deployments
Loading

0 comments on commit 1d97161

Please sign in to comment.