1👍
✅
It should rather look like this:
def save(self):
user = super(UserRegisterForm, self).save(commit=False)
user.set_password(self.cleaned_data['password'])
user.save()
return user
As far as I know Django has a built-in view for user registration so there’s no need of writing your own (except from learning).
0👍
I think your import is using the default view instead of the one from a backend that has been implemented.
from registration.backends.hmac.views import RegistrationView
Instead of from registration.views import RegistrationView
- [Answer]-Generate csrf_token in nginx by using Openresty with Django as a backend server
- [Answer]-State considerations when converting a python desktop application into a web app?
- [Answer]-Django, get list of an attribute for multiple attributes
Source:stackexchange.com