Rename checkforBlankInputs to checkForBlankInputs.js.
Move this file to the same path it has in main branch.[^1]
Add __init__.py into the utils/ folder.[^1][^2]
Add , 'apps.utils' to CUSTOM_APPS.
[^1]: Django static files are confusing. TL;DR Given the utils folder is recognized as an app, Django copies /…/apps/utils/static/utils/js/checkForBlankInputs.js to /…/static/utils/js/checkForBlankInputs.js (see inside container; it is not synced to your local machine). OMG;MORE: Python treats folders with an __init__.py (like the apcd-cms/src/apps/utils in main) as an "app". Then Django reads /static folder (by default) of any "app" as where to find static files, but only if they are within a folder of the same name as the "app" folder e.g. utils/static/utils/. Anything after that confusing-and-required hierarchy is then recognized as a static file, and copied to /static (root folder).
[^2]: At utils/__init__.py not utils/static/utils/__init__.py. Change 4—registering apps.utils as an app—may make this moot, but I am just being consistent with main for now.
Overview
Ensure
checkForBlankInputs.js
script loads.Related
Changes
checkforBlankInputs
tocheckForBlankInputs.js
.main
branch.[^1]__init__.py
into theutils/
folder.[^1][^2], 'apps.utils'
toCUSTOM_APPS
.[^1]: Django static files are confusing. TL;DR Given the
utils
folder is recognized as an app, Django copies/…/apps/utils/static/utils/js/checkForBlankInputs.js
to/…/static/utils/js/checkForBlankInputs.js
(see inside container; it is not synced to your local machine). OMG;MORE: Python treats folders with an__init__.py
(like theapcd-cms/src/apps/utils
inmain
) as an "app". Then Django reads/static
folder (by default) of any "app" as where to find static files, but only if they are within a folder of the same name as the "app" folder e.g.utils/static/utils/
. Anything after that confusing-and-required hierarchy is then recognized as a static file, and copied to/static
(root folder).[^2]: At
utils/__init__.py
notutils/static/utils/__init__.py
. Change 4—registeringapps.utils
as an app—may make this moot, but I am just being consistent withmain
for now.Testing
checkForBlankInputs.js
loads.<script>
into a field.<script>
becomesscript
.UI
https://github.com/TACC/Core-CMS-Custom/assets/62723358/bccfb9b3-2841-4b5c-804f-1683babb136d