- Database
brew install postgresql
psql
- To use app in docker or locally there need to be two files added to:
~/little_ewardrobe/ewardrobe/ewardrobe/ $ touch secrets.docker.json
~/little_ewardrobe/ewardrobe/ewardrobe/ $ touch secrets.json
It should be filled according to:
~/little_ewardrobe/ewardrobe/ewardrobe/secrets.ci.json
- Migrations
python manage.py makemigrations
python manage.py migrate
- Generating example data
python manage.py runscript generate_data
Data will be saved in data
directory
- Loading data from given csv
python manage.py runscript load_data
- Running server
locally:
python manage.py runserver
using docker:
make build
make run
then in browser:
http://localhost:8000/
- Pushing changes to production
~/little_ewardrobe$ heroku container:push web
~/little_ewardrobe$ heroku container:release web
~/little_ewardrobe$ heroku open
to track logs
heroku logs
- Static files on heroku are managed with
collectstatic
andwhitenoise
python manage.py collectstatic
- Running tests
python manage.py test
- Running with admin panel
python manage.py createsuperuser
python manage.py runserver
go to: http://127.0.0.1:8000/admin/
- Finite state machine in django
pip install django-fsm