Django project in django/, Ansible provisioning and deployment stuff in ansible/. Switch to django/ before working on the site. Don't switch to ansible/ when provisioning/deploying though ...
- Install dependencies from
django/requirements-dev.txt. You probably want to usepipandvirtualenv. Note this is a Python 3 project. - TODO Database/admin user setup.
Run python manage.py runserver from the django/ project directory.
Whenever translations need to be updated:
- Run
dj makemessages(assuming bash alias from above) to regenerate locale files. - Start the dev server, log in as the admin user to admin UI.
- Go to
localhost/rosettaand start updating translations. Much better than editing po files by hand. No need to rundj compilemessagessince Rosetta does that for you when you save.
List tags:
ansible-playbook ansible/site.yaml --list-tags
List "deploy" tasks:
ansible-playbook ansible/site.yaml --tags deploy --list-tasks
Deploy to staging server(s):
ansible-playbook ansible/site.yaml -i ansible/staging --ask-become-pass --tags deploy
Actually ... The same server is currently used for staging and production domains, but we vary the domain variable in the inventory.
The source code is licensed under Mozilla Public License Version 2.0.
All assets (images/logos/branding) are property of Team Nova.