Verified Commit f148f64f authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix user change form after forcing lowercase

parent d2b7e3d5
...@@ -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.ModelForm): class UserCreationForm(BaseUserCreationForm):
# 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.ModelForm): class UserChangeForm(BaseUserChangeForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment