1

Is it possible to use RegistrationFormUniqueEmail with the HMAC activation workflow?

My urls.py looks like this:

from django.conf.urls import url, include
from app.registration import RegistrationViewUniqueEmail

urlpatterns = [
    url(r'^accounts/register/$', RegistrationViewUniqueEmail.as_view(), name='registration_register'),
    url(r'^accounts/', include('registration.backends.hmac.urls')),
]

I have a file app/registration.py

from registration.backends.hmac.views import RegistrationView
from registration.forms import RegistrationFormUniqueEmail

class RegistrationViewUniqueEmail(RegistrationView):
    form_class = RegistrationFormUniqueEmail

I am able to complete registration i.e. the user is created in the auth_user table and I am unable to create more than one user with the same email address as expected, but I believe it is failing when the authentication email is being sent.

SMTPAuthenticationError at /accounts/register/
(535, b'5.7.8 Error: authentication failed: UGFzc3dvcmQ6')

Does anyone know what's going wrong here?

Raddfood
  • 169
  • 2
  • 4
  • 17

1 Answers1

-1

(original answer here by seddonym)

The only thing to do is replace

from registration.backends.default.views import RegistrationView

with

from registration.backends.hmac.views import RegistrationView
kopsti
  • 93
  • 1
  • 9