From 72eec662e4a08fee1f694c2eb6f01275706d42d4 Mon Sep 17 00:00:00 2001 From: relikd Date: Wed, 3 Jul 2024 00:47:14 +0200 Subject: [PATCH] chore: initial.json --- README.md | 8 +++++++- backend/app/fixtures/__init__.py | 0 backend/app/fixtures/initial.json | 29 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 backend/app/fixtures/__init__.py create mode 100644 backend/app/fixtures/initial.json diff --git a/README.md b/README.md index 609837f..718e076 100644 --- a/README.md +++ b/README.md @@ -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 +``` diff --git a/backend/app/fixtures/__init__.py b/backend/app/fixtures/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/backend/app/fixtures/initial.json b/backend/app/fixtures/initial.json new file mode 100644 index 0000000..a3a7ab6 --- /dev/null +++ b/backend/app/fixtures/initial.json @@ -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 + } + } +] \ No newline at end of file