From 2691380f810abaf7a8dd80243ed00da4f6736a58 Mon Sep 17 00:00:00 2001 From: Corban-Lee Jones Date: Tue, 23 Jan 2024 12:11:43 +0000 Subject: [PATCH] Update & create scripts for linux & windows --- scripts/fixtures.bat | 21 +++++++++++++++++++++ scripts/fixtures.ps1 | 19 +++++++++++++++++++ scripts/fixtures.sh | 4 ++-- scripts/runserver.bat | 7 +++++++ scripts/runserver.ps1 | 5 +++++ 5 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 scripts/fixtures.bat create mode 100644 scripts/fixtures.ps1 create mode 100644 scripts/runserver.bat create mode 100644 scripts/runserver.ps1 diff --git a/scripts/fixtures.bat b/scripts/fixtures.bat new file mode 100644 index 0000000..61736ef --- /dev/null +++ b/scripts/fixtures.bat @@ -0,0 +1,21 @@ +@echo off + +echo migrating +python manage.py migrate + +echo installing authentication fixtures +python manage.py loaddata apps\authentication\fixtures\department.json + +echo installing default users +python manage.py loaddata apps\authentication\fixtures\user.json + +echo installing ticket priorities +python manage.py loaddata apps\home\fixtures\ticketpriority.json + +echo installing ticket tags +python manage.py loaddata apps\home\fixtures\tickettag.json + +echo installing default tickets +python manage.py loaddata apps\home\fixtures\ticket.json + +echo all done! diff --git a/scripts/fixtures.ps1 b/scripts/fixtures.ps1 new file mode 100644 index 0000000..488f00a --- /dev/null +++ b/scripts/fixtures.ps1 @@ -0,0 +1,19 @@ +Write-Host "migrating" +python manage.py migrate + +Write-Host "installing authentication fixtures" +python manage.py loaddata apps\authentication\fixtures\department.json + +Write-Host "installing default users" +python manage.py loaddata apps\authentication\fixtures\user.json + +Write-Host "installing ticket priorities" +python manage.py loaddata apps\home\fixtures\ticketpriority.json + +Write-Host "installing ticket tags" +python manage.py loaddata apps\home\fixtures\tickettag.json + +Write-Host "installing default tickets" +python manage.py loaddata apps\home\fixtures\ticket.json + +Write-Host "all done!" diff --git a/scripts/fixtures.sh b/scripts/fixtures.sh index b5662d0..e329385 100755 --- a/scripts/fixtures.sh +++ b/scripts/fixtures.sh @@ -5,7 +5,7 @@ echo installing authentication fixtures python manage.py loaddata apps/authentication/fixtures/department.json echo installing default users -python manage.py loaddata apps/authentication/fixtures/defaultuser.json +python manage.py loaddata apps/authentication/fixtures/user.json echo installing ticket priorities python manage.py loaddata apps/home/fixtures/ticketpriority.json @@ -14,6 +14,6 @@ echo installing ticket tags python manage.py loaddata apps/home/fixtures/tickettag.json echo installing default tickets -python manage.py loaddata apps/home/fixtures/newtickets.json +python manage.py loaddata apps/home/fixtures/ticket.json echo all done! \ No newline at end of file diff --git a/scripts/runserver.bat b/scripts/runserver.bat new file mode 100644 index 0000000..13aa5b8 --- /dev/null +++ b/scripts/runserver.bat @@ -0,0 +1,7 @@ +@echo off + +echo Migrating database... +python manage.py migrate + +echo Running without reload... +python manage.py runserver 0.0.0.0:8000 --noreload diff --git a/scripts/runserver.ps1 b/scripts/runserver.ps1 new file mode 100644 index 0000000..29e5758 --- /dev/null +++ b/scripts/runserver.ps1 @@ -0,0 +1,5 @@ +Write-Host "Migrating database..." +python manage.py migrate + +Write-Host "Running without reload..." +python manage.py runserver 0.0.0.0:8000 --noreload