Skip to content

Commit

Permalink
Add seed file with basic genres #12
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktm committed Feb 11, 2023
1 parent c383ccf commit efce3ba
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
42 changes: 42 additions & 0 deletions unicorn/seed.json
Original file line number Diff line number Diff line change
@@ -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" }
}
]

0 comments on commit efce3ba

Please sign in to comment.