Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
f148f64f
Verified
Commit
f148f64f
authored
Mar 08, 2017
by
Sébastiaan Versteeg
Browse files
Fix user change form after forcing lowercase
parent
d2b7e3d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/members/forms.py
View file @
f148f64f
...
@@ -2,6 +2,8 @@ from __future__ import unicode_literals
...
@@ -2,6 +2,8 @@ from __future__ import unicode_literals
from
django
import
forms
from
django
import
forms
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
django.contrib.auth.forms
import
UserChangeForm
as
BaseUserChangeForm
from
django.contrib.auth.forms
import
UserCreationForm
as
BaseUserCreationForm
from
django.template
import
loader
from
django.template
import
loader
from
django.utils
import
translation
from
django.utils
import
translation
from
django.utils.translation
import
ugettext
from
django.utils.translation
import
ugettext
...
@@ -22,7 +24,7 @@ class MemberForm(forms.ModelForm):
...
@@ -22,7 +24,7 @@ class MemberForm(forms.ModelForm):
model
=
Member
model
=
Member
class
UserCreationForm
(
forms
.
Model
Form
):
class
UserCreationForm
(
BaseUserCreation
Form
):
# Don't forget to edit the formset in admin.py!
# Don't forget to edit the formset in admin.py!
# This is a stupid quirk of the user admin.
# This is a stupid quirk of the user admin.
...
@@ -72,7 +74,7 @@ class UserCreationForm(forms.ModelForm):
...
@@ -72,7 +74,7 @@ class UserCreationForm(forms.ModelForm):
'send_welcome_email'
)
'send_welcome_email'
)
class
UserChangeForm
(
forms
.
Model
Form
):
class
UserChangeForm
(
BaseUserChange
Form
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
super
().
__init__
(
*
args
,
**
kwargs
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment