Add fixtures

This commit is contained in:
bglacial 2019-01-16 23:30:24 +01:00
parent da5582ed19
commit 8268abaaf8
2 changed files with 4 additions and 0 deletions

1
fixtures/db.json Normal file
View File

@ -0,0 +1 @@
[{"model": "timelaps.team", "pk": 1, "fields": {"name": "OCK 1", "comment": null}}, {"model": "timelaps.team", "pk": 2, "fields": {"name": "OCK 2", "comment": null}}, {"model": "timelaps.driver", "pk": 1, "fields": {"first_name": "Nicolas", "last_name": "Riault"}}, {"model": "timelaps.driver", "pk": 2, "fields": {"first_name": "Julien", "last_name": "Roger"}}, {"model": "timelaps.rules", "pk": 1, "fields": {"min_stand_duration": 90, "max_autonomy_dry": 120, "max_autonomy_wet": 160, "max_driving_duration": 150, "relay_default_duration": 45}}, {"model": "timelaps.race", "pk": 1, "fields": {"name": "1000 Tours du mans", "start_date": "2019-01-25T16:00:00Z", "end_date": "2019-01-24T16:00:00Z", "duration": 64800, "fk_rules": 1, "comment": "A priori on gagne"}}, {"model": "timelaps.engagedpilot", "pk": 1, "fields": {"team": 1, "pilot": 1, "race": 1, "order": 0}}, {"model": "timelaps.engagedpilot", "pk": 2, "fields": {"team": 1, "pilot": 2, "race": 1, "order": 1}}, {"model": "timelaps.relay", "pk": 1, "fields": {"team_pilot": 1, "relay_start": "2019-01-25T16:00:00Z", "relay_end": null, "has_refuel": true, "pilot_chrono": 62, "comment": null}}]

View File

@ -6,6 +6,9 @@ python3 manage.py makemigrations
##Create admin tables
python3 manage.py migrate
###Populate the database
python3 manage.py loaddata fixtures/db.json
##Create admin user
python3 manage.py createsuperuser --email admin@gmail.com --username admin