mirror of https://github.com/snachodog/mybuddy.git
parent
2cef8199fc
commit
de4d66cecd
|
@ -20,6 +20,7 @@ class UserAddForm(UserCreationForm):
|
|||
|
||||
def save(self, commit=True):
|
||||
user = super(UserAddForm, self).save(commit=False)
|
||||
# All Baby Buddy users are superusers.
|
||||
user.is_superuser = True
|
||||
if commit:
|
||||
user.save()
|
||||
|
|
|
@ -113,6 +113,8 @@ class Command(BaseCommand):
|
|||
).create_user(**user_data, password=user_password)
|
||||
user.email = options.get("email")
|
||||
user.is_staff = options.get("is_staff")
|
||||
# All Baby Buddy users are superusers.
|
||||
user.is_superuser = True
|
||||
user.save()
|
||||
|
||||
if options.get("verbosity") > 0:
|
||||
|
|
Loading…
Reference in New Issue