A shiny new Wagtail project!
Development requires a local installation of Docker and Docker Compose.
Pre-commit hooks are scripts that run on your local machine before every commit.
We use the pre-commit framework to run code linters and formatters that keep our codebase clean.
To set up Pre-Commit, install the Python package on your local machine using:
python -m pip install pre-commitIf you'd rather not install pre-commit globally, create and activate a virtual environment in this repo before running the above command.
Then, run:
pre-commit installSince hooks are run locally, you can modify which scripts are run before each commit by modifying .pre-commit-config.yaml.
docker compose updocker compose -f docker-compose.yml -f tests/docker-compose.yml run --rm appWe use the Bootstrap Node package to build a custom version of Bootstrap for our use. To
make changes to Bootstrap defaults (colors, layout, etc.), update the included Sass file
at la_metro_translation_suite/static/scss/la_metro_translation_suite.scss. Changes
to this file will automatically be applied during local development.
To add styles unrelated to Bootstrap, e.g., customizing a map or some other novel element,
update the included CSS file at la_metro_translation_suite/static/css/la_metro_translation_suite.css.
Initial CMS content is loaded in a data migration using the initialize_database management
command.
You will need to create a default user in order to access the CMS:
python manage.py createsuperuserTo dump your local database to a fixture and copy any files you've uploaded locally, run:
docker compose run --rm app python manage.py dump_contentTo load a fixture into your local database, run:
docker compose run --rm app python manage.py load_content