mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-04 00:47:02 +01:00
updated start script
This commit is contained in:
1 parent
3893378146
commit
3cfdc29f11
1 file changed
-12
@@ -14,18 +14,6 @@ python manage.py collectstatic --no-input
|
||||
# Ensure media directory exists
|
||||
mkdir -p media/flavors
|
||||
|
||||
# Create superuser if it doesn't exist
|
||||
echo "Creating superuser..."
|
||||
python manage.py shell <<EOF
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
if not User.objects.filter(username='admin').exists():
|
||||
User.objects.create_superuser('admin', 'admin@example.com', 'password123')
|
||||
print('Superuser created.')
|
||||
else:
|
||||
print('Superuser already exists.')
|
||||
EOF
|
||||
|
||||
# Sync flavors from the API
|
||||
echo "Syncing flavors..."
|
||||
python manage.py sync_flavors
|
||||
|
||||
Reference in new issue
Block a user