Read Django CMS User Guide for CMS user instructions.
- Add Styles & Scripts
- Build Static Files
- Collect Static Files
- Customize & Translate Text
- Demo UI Patterns
- Develop with Core Styles Simultaneously
To add styles or scripts, first read Styles and Scripts.
All CSS static files are built:
- from source files in
src
directories - to compiled files in
build
directories
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 --project="core-cms"
Important If you are developing a Core CMS Resources project, use
--project="custom_project_dir"
-
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!
-
Create 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
.mo
file:docker exec -it core_cms /bin/bash # That opens a command prompt within the container. cd /code apt-get install gettext django-admin compilemessages
A demo of any documented CSS modules from Core Styles and Core CMS.
-
Build:
npm run build:ui-demo
-
docker exec -it core_cms sh -c "python manage.py collectstatic --no-input"