mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-06-06 17:13:02 -04:00
fix: loaddata
This commit is contained in:
@@ -6,8 +6,7 @@ ADMIN_PASSWORD=${ADMIN_PASSWORD:-$RANDOM_ADMIN_PASS}
|
|||||||
if [ X"$ENABLE_MIGRATIONS" = X"yes" ]; then
|
if [ X"$ENABLE_MIGRATIONS" = X"yes" ]; then
|
||||||
echo "Running migrations service"
|
echo "Running migrations service"
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
EXISTING_INSTALLATION=`echo "from users.models import User; print(User.objects.exists())" |python manage.py shell 2>/dev/null | tail -1`
|
if DJANGO_SETTINGS_MODULE=cms.settings python -c "import django, sys; django.setup(); from users.models import User; sys.exit(0 if User.objects.exists() else 1)" 2>/dev/null; then
|
||||||
if [ "$EXISTING_INSTALLATION" = "True" ]; then
|
|
||||||
echo "Loaddata has already run"
|
echo "Loaddata has already run"
|
||||||
else
|
else
|
||||||
echo "Running loaddata and creating admin user"
|
echo "Running loaddata and creating admin user"
|
||||||
|
|||||||
Reference in New Issue
Block a user