(Django 1.8, Django-Registration-Redux 1.4)
After following the answer in this SO post: django-registration-redux add extra field
I've implemented a custom view with my own template to register a user, and my custom form is correctly rendered.
user_views.py
class SignupView(RegistrationView):
form_class = MyRegistrationForm
def register(self, request, form):
print form
print request
new_user = super(SignupView, self).register(request, form)
my_user_model = MyUserModel()
my_user_model.user = new_user
my_user_model.save()
return new_user
However, register doesn't seem to get called. But, when I define post() - the request comes through with all of the form data.
urls.py
url(
r'^accounts/register/',
user_views.SignupView.as_view(),
name='signup'
), # Customized-Register
url(
r'^accounts/',
include('registration.backends.default.urls')
), # Registration-Redux
Would appreciate guidance on the correct usage, thanks!