From 77dc45044bfe279fd378c5621d0a9aeeed8bb9c9 Mon Sep 17 00:00:00 2001 From: corbz Date: Wed, 17 Jan 2024 21:54:35 +0000 Subject: [PATCH] moved fixtures into app folders --- .../fixtures}/defaultuser.json | 0 .../fixtures}/department.json | 0 apps/fixtures/home/ticketpriority.json | 38 ------------------- .../fixtures}/defaulttickets.json | 0 .../home => home/fixtures}/newtickets.json | 0 apps/home/fixtures/ticketpriority.json | 38 +++++++++++++++++++ .../home => home/fixtures}/tickettag.json | 0 scripts/fixtures.sh | 12 +++--- 8 files changed, 44 insertions(+), 44 deletions(-) rename apps/{fixtures/authentication => authentication/fixtures}/defaultuser.json (100%) rename apps/{fixtures/authentication => authentication/fixtures}/department.json (100%) delete mode 100644 apps/fixtures/home/ticketpriority.json rename apps/{fixtures/home => home/fixtures}/defaulttickets.json (100%) rename apps/{fixtures/home => home/fixtures}/newtickets.json (100%) create mode 100644 apps/home/fixtures/ticketpriority.json rename apps/{fixtures/home => home/fixtures}/tickettag.json (100%) diff --git a/apps/fixtures/authentication/defaultuser.json b/apps/authentication/fixtures/defaultuser.json similarity index 100% rename from apps/fixtures/authentication/defaultuser.json rename to apps/authentication/fixtures/defaultuser.json diff --git a/apps/fixtures/authentication/department.json b/apps/authentication/fixtures/department.json similarity index 100% rename from apps/fixtures/authentication/department.json rename to apps/authentication/fixtures/department.json diff --git a/apps/fixtures/home/ticketpriority.json b/apps/fixtures/home/ticketpriority.json deleted file mode 100644 index 5bd38d4..0000000 --- a/apps/fixtures/home/ticketpriority.json +++ /dev/null @@ -1,38 +0,0 @@ -[ -{ - "model": "home.ticketpriority", - "pk": "0ebc194c-b856-4e4f-9def-cd190d1e8d43", - "fields": { - "title": "Low", - "colour": "#388e3c", - "backgroundcolour": "#e8f5e9" - } -}, -{ - "model": "home.ticketpriority", - "pk": "a680328f-0680-456c-8e26-f594e05989ad", - "fields": { - "title": "High", - "colour": "#ef6c00", - "backgroundcolour": "#ffe0b2" - } -}, -{ - "model": "home.ticketpriority", - "pk": "d140a5be-cf24-4250-8b38-31338e69dffd", - "fields": { - "title": "Urgent", - "colour": "#c62828", - "backgroundcolour": "#ffcdd2" - } -}, -{ - "model": "home.ticketpriority", - "pk": "e79687c6-9054-4706-b9a2-34afccfaa7c8", - "fields": { - "title": "Normal", - "colour": "#2e7d32", - "backgroundcolour": "#c8e6c9" - } -} -] diff --git a/apps/fixtures/home/defaulttickets.json b/apps/home/fixtures/defaulttickets.json similarity index 100% rename from apps/fixtures/home/defaulttickets.json rename to apps/home/fixtures/defaulttickets.json diff --git a/apps/fixtures/home/newtickets.json b/apps/home/fixtures/newtickets.json similarity index 100% rename from apps/fixtures/home/newtickets.json rename to apps/home/fixtures/newtickets.json diff --git a/apps/home/fixtures/ticketpriority.json b/apps/home/fixtures/ticketpriority.json new file mode 100644 index 0000000..5b1a940 --- /dev/null +++ b/apps/home/fixtures/ticketpriority.json @@ -0,0 +1,38 @@ +[ + { + "model": "home.ticketpriority", + "pk": "d140a5be-cf24-4250-8b38-31338e69dffd", + "fields": { + "title": "Urgent", + "colour": "#c62828", + "backgroundcolour": "#ffcdd2" + } + }, + { + "model": "home.ticketpriority", + "pk": "a680328f-0680-456c-8e26-f594e05989ad", + "fields": { + "title": "High", + "colour": "#ef6c00", + "backgroundcolour": "#ffe0b2" + } + }, + { + "model": "home.ticketpriority", + "pk": "e79687c6-9054-4706-b9a2-34afccfaa7c8", + "fields": { + "title": "Normal", + "colour": "#2e7d32", + "backgroundcolour": "#c8e6c9" + } + }, + { + "model": "home.ticketpriority", + "pk": "0ebc194c-b856-4e4f-9def-cd190d1e8d43", + "fields": { + "title": "Low", + "colour": "#388e3c", + "backgroundcolour": "#e8f5e9" + } + } +] diff --git a/apps/fixtures/home/tickettag.json b/apps/home/fixtures/tickettag.json similarity index 100% rename from apps/fixtures/home/tickettag.json rename to apps/home/fixtures/tickettag.json diff --git a/scripts/fixtures.sh b/scripts/fixtures.sh index 602df4f..b5662d0 100755 --- a/scripts/fixtures.sh +++ b/scripts/fixtures.sh @@ -1,19 +1,19 @@ echo migrating python manage.py migrate -echo installing departments -python manage.py loaddata apps/fixtures/authentication/department.json +echo installing authentication fixtures +python manage.py loaddata apps/authentication/fixtures/department.json echo installing default users -python manage.py loaddata apps/fixtures/authentication/defaultuser.json +python manage.py loaddata apps/authentication/fixtures/defaultuser.json echo installing ticket priorities -python manage.py loaddata apps/fixtures/home/ticketpriority.json +python manage.py loaddata apps/home/fixtures/ticketpriority.json echo installing ticket tags -python manage.py loaddata apps/fixtures/home/tickettag.json +python manage.py loaddata apps/home/fixtures/tickettag.json echo installing default tickets -python manage.py loaddata apps/fixtures/home/defaulttickets.json +python manage.py loaddata apps/home/fixtures/newtickets.json echo all done! \ No newline at end of file