Skip to content

datamade/la-metro-translation-suite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

La Metro Translation Suite

A shiny new Wagtail project!

Development

Setup

Docker

Development requires a local installation of Docker and Docker Compose.

Pre-commit

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-commit

If 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 install

Since hooks are run locally, you can modify which scripts are run before each commit by modifying .pre-commit-config.yaml.

Usage

Running the app

docker compose up

Running the tests

docker compose -f docker-compose.yml -f tests/docker-compose.yml run --rm app

Managing site styles

We 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.

Managing CMS content

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 createsuperuser

To 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_content

To load a fixture into your local database, run:

docker compose run --rm app python manage.py load_content

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages