Commit 21026653 authored by David Seaward's avatar David Seaward

correction: apply form labels in __init__ not Meta

parent 6ae8ed9c
......@@ -5,8 +5,15 @@ from .models import User
class RegistrationForm(BaseRegistrationForm):
email = None # override base definition to remove email field
def __init__(self, *args, **kwargs):
super(RegistrationForm, self).__init__(*args, **kwargs)
self.fields[User.USERNAME_FIELD].label = _("Username")
self.fields["password1"].label = _("Passphrase")
self.fields["password2"].label = _("Passphrase confirmation")
class Meta(BaseRegistrationForm.Meta):
model = User
......@@ -17,9 +24,3 @@ class RegistrationForm(BaseRegistrationForm):
'password1',
'password2',
)
labels = {
User.USERNAME_FIELD: _("Username"),
'password1': _("Passphrase"),
'password2': _("Passphrase confirmation"),
}
Markdown is supported
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