Start the dev server for local development:
docker-compose -f docker-compose.local.yml up
Create superuser:
python manage.py initadmin --settings settings.settings --username <EMAIL> --password <PASSWORD>
Go to http://localhost:8088/
For the admin interface: http://localhost:8088/admin/
The Django project needs some configuration in order to run locally. It's possible to add these manually, but the quickest way is importing using fixtures from the acceptance environment. You can download these automatically at:https://acc.omslagroute.amsterdam.nl/admin/dumpdata. You'll need to be logged in using an admin account first to access this url.
Move the json into the app
directory on the root of your project, and run the following command
docker-compose -f docker-compose.local.yml run --rm omslagroute python manage.py loaddata <name of fixture>
Remove the json fixture after installing it.
To rebuild (for example, when dependencies are added requirements.txt):
docker-compose -f docker-compose.local.yml build
Start watching static files changes scss:
docker-compose -f docker-compose.local.yml exec omslagroute ./node_modules/.bin/node-sass -o ./assets/bundles/ static_src/sass --watch
Start watching static files changes js, vue:
docker-compose -f docker-compose.local.yml exec omslagroute ./node_modules/.bin/webpack --config webpack.config.js --watch
Migrate database without restarting containers:
docker-compose -f docker-compose.local.yml exec omslagroute python manage.py migrate
The city of Amsterdam has developed a design system. Not all patterns have been built, they are built as soon as they become applicable. Ask colleagues through the OIS Slack #frontend channel.
The documentation for (React) components based on elements from the design system can be found in the storybook pages of the Amsterdam Styled Components repository.