Skip to content

Latest commit

 

History

History
118 lines (79 loc) · 3.11 KB

File metadata and controls

118 lines (79 loc) · 3.11 KB

Develop Project

Read Django CMS User Guide for CMS user instructions.

Table of Contents

Manage Dependencies

Read Manage Dependencies.

Add Styles & Scripts

To add styles or scripts, first read Styles and Scripts.

Build Static Files

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.

  1. Install Dependencies:

    Note Only necessary for a new container or changes to Node dependencies.

    npm ci
  2. Build Styles:

    npm run build:css
  3. Collect Static Files:

    docker exec -it core_cms sh -c "python manage.py collectstatic --no-input"

Collect Static Files

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!

Customize & Translate Text

  1. Edit file:
    /taccsite_cms/locale/en/LC_MESSAGES/django.po

  2. Add to the file only:

    • the strings to translate
    • appropriate comments for that string
      (reference the existing entries)
  3. 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
  4. Restart the CMS server.

Review Patterns in Core Styles

For Latest Patterns & Styles

See https://tacc.github.io/Core-Styles.

For Patterns & Styles as of Your CMS Version:

  1. See current version of Core Styles installed:
    npm list @tacc/core-styles
  2. Checkout Core Styles at that version, e.g.:
    git checkout v2.47.2
  3. Follow Core Styles "Quick Start" up to npm start.

Develop with Core Styles Simultaneously

See Locally Develop CMS and Styles.