ubernostrum / django-registration

An extensible user-registration app for Django.
BSD 3-Clause "New" or "Revised" License
923 stars 241 forks source link

NotImplemented Error in RegistrationView #167

Closed tBaxter closed 6 years ago

tBaxter commented 6 years ago

Let me preface this by saying I'm replacing a very old copy of django registration, a lot has moved in the interim, and in all likelihood this is my error. But that said, I'm not seeing how the current version works.

What I'm seeing is a NotImplemented error raised by RegistrationView.register (https://github.com/ubernostrum/django-registration/blob/master/src/django_registration/views.py#L62) As I trace it back, I see register is called by form_valid (https://github.com/ubernostrum/django-registration/blob/master/src/django_registration/views.py#L49) so I'm not seeing how a valid form wouldn't raise the error.

Can you clarify?

Thank you, and also, let me thank you for the years of hard work and careful though i know you've put into this. It shows, and I doubt I'd trust any other registration solution.

ubernostrum commented 6 years ago

The base RegistrationView is never ever meant to be actually used as a view; you are required to either use one of the subclasses of it provided in the app (see the documentation), or write your own subclass if your preferred registration workflow doesn't match the built-in ones (again, see the documentation). The NotimplementedError enforces that by crashing you if you try to use RegistrationView directly.

tBaxter commented 6 years ago

Thank you James. That makes perfect sense.