Read Django CMS User Guide for CMS user instructions.
- Manage Dependencies
- Add Styles & Scripts
- Build Static Files
- Collect Static Files
- Customize & Translate Text
- Review Patterns from Core Styles
- Develop with Core Styles Simultaneously
Read Manage Dependencies.
To add styles or scripts, first read Styles and Scripts.
All CSS static files are built:
- from source files in
srcdirectories - to compiled files in
builddirectories
This allows use of future-proof CSS via Core Styles.
-
Install Dependencies:
Note Only necessary for a new container or changes to Node dependencies.
npm ci
-
Build Styles:
npm run build:css
-
docker exec -it core_cms sh -c "python manage.py collectstatic --no-input"
Whenever files in a static/ directory are changed, the CMS must be manually told to serve them:
docker exec -it core_cms sh -c "python manage.py collectstatic --no-input"Note Building static files is a changes to files in a
static/directory.
Note We may be able to automatically perform
collectstatic. Help wanted!
-
Edit file:
/taccsite_cms/locale/en/LC_MESSAGES/django.po -
Add to the file only:
- the strings to translate
- appropriate comments for that string
(reference the existing entries)
-
Build the
.mofile:docker exec -it core_cms /bin/bash # That opens a command prompt within the container. cd /code apt-get install gettext django-admin compilemessages
See https://tacc.github.io/Core-Styles.
- See current version of Core Styles installed:
npm list @tacc/core-styles
- Checkout Core Styles at that version, e.g.:
git checkout v2.47.2
- Follow Core Styles "Quick Start" up to
npm start.