fix merge errors
This commit is contained in:
parent
b7a0e83c68
commit
9c031768f8
@ -24,21 +24,6 @@ class UserCreateForm(forms.ModelForm, CssClassMixin):
|
||||
groups = forms.ModelMultipleChoiceField(
|
||||
queryset=Group.objects.exclude(name__iexact='anonymous'),
|
||||
label=_("User groups"), required=False)
|
||||
is_active = forms.BooleanField(label=_("Active"), required=False,
|
||||
initial=True)
|
||||
|
||||
class Meta:
|
||||
model = User
|
||||
exclude = ('username', 'password', 'is_staff', 'is_superuser',
|
||||
'last_login', 'date_joined', 'user_permissions')
|
||||
|
||||
|
||||
class UserEditForm(forms.ModelForm, CssClassMixin):
|
||||
first_name = forms.CharField(label=_("First name"))
|
||||
last_name = forms.CharField(label=_("Last name"))
|
||||
groups = forms.ModelMultipleChoiceField(queryset=Group.objects.all(),
|
||||
label=_("User groups"), required=False)
|
||||
is_active = forms.BooleanField(label=_("Active"), required=False)
|
||||
|
||||
class Meta:
|
||||
model = User
|
||||
@ -111,6 +96,7 @@ class UsersettingsForm(forms.ModelForm, CssClassMixin):
|
||||
model = User
|
||||
fields = ('username', 'first_name', 'last_name', 'email')
|
||||
|
||||
|
||||
class UserImportForm(forms.Form, CssClassMixin):
|
||||
csvfile = forms.FileField(widget=forms.FileInput(attrs={'size': '50'}),
|
||||
label=_("CSV File"))
|
||||
|
@ -151,6 +151,7 @@ class UserCreateView(CreateView):
|
||||
form.cleaned_data['last_name'])
|
||||
if not self.object.default_password:
|
||||
self.object.default_password = gen_password()
|
||||
self.object.set_password(self.object.default_password)
|
||||
|
||||
|
||||
class UserUpdateView(UpdateView):
|
||||
|
Loading…
Reference in New Issue
Block a user