40 lines
756 B
Markdown
40 lines
756 B
Markdown
# Installation
|
|
|
|
###Prepare database
|
|
python manage.py makemigrations
|
|
|
|
###Create admin tables
|
|
python manage.py migrate
|
|
|
|
###Populate the database
|
|
python manage.py loaddata fixtures/db.json
|
|
|
|
###Dump the database into file
|
|
python manage.py dumpdata > fixtures/db.json
|
|
|
|
###Create admin user
|
|
python manage.py createsuperuser --email admin@gmail.com --username admin
|
|
|
|
###Prepare database for timelaps
|
|
python manage.py makemigrations timelaps
|
|
|
|
###migrate timelaps
|
|
python manage.py migrate
|
|
|
|
# Exploitation
|
|
|
|
###Exécuter les tests
|
|
python manage.py test
|
|
|
|
coverage run --source='.' manage.py test
|
|
coverage html
|
|
coverage report
|
|
|
|
###Lancement du server
|
|
cd /mnt/d/Dev/Applications/timelaps_api
|
|
|
|
service postgresql start
|
|
service apache2 start
|
|
|
|
python manage.py runserver
|