chore: initial.json
This commit is contained in:
@@ -7,8 +7,14 @@ Django app for managing places with json export and a fully-static frontend map.
|
||||
|
||||
## Deploy
|
||||
|
||||
Start container with `docker-compose up -d` and create admin user (first-run):
|
||||
Start container with `docker-compose up -d` and create admin user (first-run only):
|
||||
|
||||
```sh
|
||||
docker-compose exec app python manage.py createsuperuser --email ''
|
||||
```
|
||||
|
||||
Further, the frontend needs the three Content labels `info`, `imprint`, and `come-back-later`. You can either, create them manually, or run:
|
||||
|
||||
```sh
|
||||
docker-compose exec app python manage.py loaddata initial.json
|
||||
```
|
||||
|
||||
0
backend/app/fixtures/__init__.py
Executable file
0
backend/app/fixtures/__init__.py
Executable file
29
backend/app/fixtures/initial.json
Normal file
29
backend/app/fixtures/initial.json
Normal file
@@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"model": "app.content",
|
||||
"fields": {
|
||||
"key": "info",
|
||||
"title": "About",
|
||||
"body": "about this project",
|
||||
"wide": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "app.content",
|
||||
"fields": {
|
||||
"key": "imprint",
|
||||
"title": "Imprint",
|
||||
"body": "your imprint",
|
||||
"wide": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "app.content",
|
||||
"fields": {
|
||||
"key": "come-back-later",
|
||||
"title": "Not Available",
|
||||
"body": "come back later",
|
||||
"wide": false
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user