Просмотр исходного кода

Set required=False on is_superuser field on user form.

Andrew Klopper лет назад: 9
Родитель
Сommit
9f445d6091
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      accounts/viewsets.py

+ 1 - 1
accounts/viewsets.py

32
 class UserForm(forms.ModelForm):
32
 class UserForm(forms.ModelForm):
33
     username = UsernameField()
33
     username = UsernameField()
34
     email = forms.EmailField(required=True)
34
     email = forms.EmailField(required=True)
35
-    is_superuser = forms.BooleanField(label='Superuser')
35
+    is_superuser = forms.BooleanField(label='Superuser', required=False)
36
     password1 = forms.CharField(
36
     password1 = forms.CharField(
37
         label="Password",
37
         label="Password",
38
         strip=False,
38
         strip=False,