Admin UI and API for DASH
With a working version on Python 3.7+ and Pipenv:
- Install dependencies (use
sync
instead ofinstall
to usePipfile.lock
instead, and ensure a deterministic enviroment)
$ pipenv sync --dev
- Create a database (if not created yet) and migrate. A
DATABASE_URL
can be defined in a.env
file or set as an environment variable. See.env_tempate
and here for details. It will default tosqlite:///tmp/db.sqlite
. (If using MySQL, see the note about MySQL drivers inscriptchart/settings.py
)
$ touch tmp/db.sqlite
$ pipenv run python manage.py migrate
- Create a superuser
$ pipenv run python manage.py createsuperuser
- (Optional) Download and load a database dump
$ pipenv run python manage.py loaddata tmp/scripts.json
- Start development server and go to
http://localhost:8000/admin/
$ pipenv run python manage.py runserver localhost:8000
- Tests
$ pipenv run python manage.py test
- Linting
$ pipenv run flake8
Deployment will happen automatically upon a sucessful merge/rebase from develop to master.