Added setup migration for globals and userdeposits view, added create-admin script #16

This commit is contained in:
ChaoticByte 2023-02-11 20:21:27 +01:00
parent 0a1ada15fb
commit 9bc9d519c0
2 changed files with 53 additions and 0 deletions

19
scripts/create-admin.sh Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Copyright 2023 Julian Müller (ChaoticByte)
# change to correct directory, if necessary
script_absolute=$(realpath "$0")
script_directory=$(dirname "$script_absolute")
desired_directory=$(realpath "$script_directory"/..)
if [ "$PWD" != "$desired_directory" ]; then
echo "Changing to project directory..."
cd "$desired_directory"
fi
echo "Activating venv..."
source ./venv/bin/activate
echo "Applying migrations..."
./manage.py migrate
./manage.py createsuperuser