Skip to content

Commit

Permalink
Use createadmin for creating predefined user in OpenShift
Browse files Browse the repository at this point in the history
See WeblateOrg#1523

Signed-off-by: Michal Čihař <[email protected]>
  • Loading branch information
nijel committed Sep 4, 2018
1 parent 8b73c0b commit b22cc0a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions .s2i/action_hooks/setup
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ python manage.py rebuild_index --all

if [ x"$DJANGO_ADMIN_USERNAME" != x"" ]; then
echo " -----> Creating predefined Django super user"
(cat - | python manage.py shell) << !
from weblate.auth.models import User;
User.objects.create_superuser('$DJANGO_ADMIN_USERNAME',
'$DJANGO_ADMIN_EMAIL', '$DJANGO_ADMIN_PASSWORD')
!
python manage.py createadmin --username "$DJANGO_ADMIN_USERNAME" --email "$DJANGO_ADMIN_EMAIL" --password "$DJANGO_ADMIN_PASSWORD"
else
if (tty > /dev/null 2>&1); then
echo " -----> Running Django super user creation"
Expand Down

0 comments on commit b22cc0a

Please sign in to comment.