From efce3ba1956b405b946fb3b082fab59cb3aadeb3 Mon Sep 17 00:00:00 2001 From: Erik Hetland Date: Sat, 11 Feb 2023 12:24:45 +0100 Subject: [PATCH] Add seed file with basic genres #12 --- README.md | 2 ++ unicorn/seed.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 unicorn/seed.json diff --git a/README.md b/README.md index b64f880..ff65234 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ When running for the first time, or after creating migrations, remember to also Create first local superuser: `docker-compose exec web python /unicorn/unicorn/manage.py createsuperuser` +Optionally, import seed data by running `docker-compose exec web python /unicorn/unicorn/manage.py loaddata unicorn/seed.json` + ## Running locally diff --git a/unicorn/seed.json b/unicorn/seed.json new file mode 100644 index 0000000..8e57514 --- /dev/null +++ b/unicorn/seed.json @@ -0,0 +1,42 @@ +[ + { + "model": "competitions.genre", + "pk": 1, + "fields": { "category": "creative", "name": "Demo" } + }, + { + "model": "competitions.genre", + "pk": 2, + "fields": { "category": "creative", "name": "Foto" } + }, + { + "model": "competitions.genre", + "pk": 3, + "fields": { "category": "creative", "name": "Grafikk" } + }, + { + "model": "competitions.genre", + "pk": 4, + "fields": { "category": "creative", "name": "Musikk" } + }, + { + "model": "competitions.genre", + "pk": 5, + "fields": { "category": "creative", "name": "Programmering" } + }, + { + "model": "competitions.genre", + "pk": 6, + "fields": { "category": "creative", "name": "Spillutvikling" } + }, + { + "model": "competitions.genre", + "pk": 7, + "fields": { "category": "creative", "name": "Video" } + }, + { + "model": "competitions.genre", + "pk": 8, + "fields": { "category": "game", "name": "Game" } + } +]