Changing the envvars names to begin with EVENNIA instead of DJANGO
This commit is contained in:
parent
38fe709cb7
commit
6dc2b5b767
1 changed files with 4 additions and 4 deletions
|
|
@ -1425,13 +1425,13 @@ def create_superuser():
|
||||||
)
|
)
|
||||||
|
|
||||||
from os import environ
|
from os import environ
|
||||||
if ("DJANGO_SUPERUSER_USERNAME" in environ) and ("DJANGO_SUPERUSER_EMAIL" in environ):
|
if ("EVENNIA_SUPERUSER_USERNAME" in environ) and ("EVENNIA_SUPERUSER_EMAIL" in environ):
|
||||||
username, email = environ["DJANGO_SUPERUSER_USERNAME"], environ["DJANGO_SUPERUSER_EMAIL"]
|
username, email = environ["EVENNIA_SUPERUSER_USERNAME"], environ["EVENNIA_SUPERUSER_EMAIL"]
|
||||||
django.core.management.call_command("createsuperuser", "--noinput",
|
django.core.management.call_command("createsuperuser", "--noinput",
|
||||||
"--username=" + username,
|
"--username=" + username,
|
||||||
"--email=" + email, interactive=False)
|
"--email=" + email, interactive=False)
|
||||||
if "DJANGO_SUPERUSER_PASSWORD" in environ:
|
if "EVENNIA_SUPERUSER_PASSWORD" in environ:
|
||||||
password = environ["DJANGO_SUPERUSER_PASSWORD"]
|
password = environ["EVENNIA_SUPERUSER_PASSWORD"]
|
||||||
from evennia.accounts.models import AccountDB
|
from evennia.accounts.models import AccountDB
|
||||||
u = AccountDB.objects.get(username=username)
|
u = AccountDB.objects.get(username=username)
|
||||||
u.set_password(password)
|
u.set_password(password)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue