diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2016-03-02 15:26:27 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2016-03-02 15:36:28 +0000 |
commit | 23406348d4eb661b2eed4a35aaa2f8aa7fa1cffe (patch) | |
tree | 87a31edecf5f8ecffff1c8af4340d4403f120cdd | |
parent | 6cee749efb62d746969977a1ed28f88569d2b538 (diff) | |
download | infrastructure-23406348d4eb661b2eed4a35aaa2f8aa7fa1cffe.tar.gz |
baserock_openid_provider: Update for django-registration-redux 1.4
After updating from Django 1.7 to Django 1.9, I had to upgrade from
django-registration-redux 1.3 to 1.4, which broke user registration.
Change-Id: Ie9defab40b7fe6102f46522a832d7e49255f40e9
-rw-r--r-- | baserock_openid_provider/baserock_openid_provider/views.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/baserock_openid_provider/baserock_openid_provider/views.py b/baserock_openid_provider/baserock_openid_provider/views.py index 14060902..d067f66a 100644 --- a/baserock_openid_provider/baserock_openid_provider/views.py +++ b/baserock_openid_provider/baserock_openid_provider/views.py @@ -35,17 +35,16 @@ class RegistrationViewWithNames(registration.backends.default.views.Registration # including the full name gets used. form_class = forms.RegistrationFormWithNames - def register(self, request, **cleaned_data): + def register(self, form): # Calling the base class first means that we don't have to copy and # paste the contents of the register() function, but it has the # downside that we don't know the user's name when we send the # activation email. superclass = super(RegistrationViewWithNames, self) - user = superclass.register(request, **cleaned_data) + user = superclass.register(form) - first_name, last_name = cleaned_data['first_name'], cleaned_data['last_name'] - user.first_name = first_name - user.last_name = last_name + user.first_name = form.cleaned_data['first_name'] + user.last_name = form.cleaned_data['last_name'] user.save() return user |