Update & create scripts for linux & windows

This commit is contained in:
Corban-Lee Jones 2024-01-23 12:11:43 +00:00
parent 950676a9fe
commit 2691380f81
5 changed files with 54 additions and 2 deletions

21
scripts/fixtures.bat Normal file
View File

@ -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!

19
scripts/fixtures.ps1 Normal file
View File

@ -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!"

View File

@ -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!

7
scripts/runserver.bat Normal file
View File

@ -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

5
scripts/runserver.ps1 Normal file
View File

@ -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