🩹 Respect new User.email field
This commit is contained in:
parent
51037b615a
commit
812049eae7
1 changed files with 2 additions and 1 deletions
|
|
@ -101,9 +101,10 @@ def createsuperuser(root: str = "."):
|
|||
|
||||
import asyncio
|
||||
import ohmyapi_auth
|
||||
email = input("E-Mail: ")
|
||||
username = input("Username: ")
|
||||
password = getpass("Password: ")
|
||||
user = ohmyapi_auth.models.User(username=username, is_staff=True, is_admin=True)
|
||||
user = ohmyapi_auth.models.User(email=email, username=username, is_staff=True, is_admin=True)
|
||||
user.set_password(password)
|
||||
asyncio.run(project.init_orm())
|
||||
asyncio.run(user.save())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue