Email confirm error rest-auth
<p>I use a standard form for the confirmation email:
from allauth.account.views import confirm_email as allauthemailconfirmation</p>

<pre><code>urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^rest-auth/', include('rest_auth.urls')),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^rest-auth/registration/account-confirm-email/(?P&lt;key&gt;\w+)/$', allauthemailconfirmation, name="account_confirm_email"),    
    url(r'^rest-auth/registration/', include('rest_auth.registration.urls')),

]
</code></pre>

<p>Settings:</p>

<pre><code>LOGIN_REDIRECT_URL='/'
ACCOUNT_EMAIL_VERIFICATION='mandatory'
ACCOUNT_CONFIRM_EMAIL_ON_GET=False
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_USERNAME_REQUIRED = True
ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = False
</code></pre>

<p>I correctly get an e-mail, but when you try to link:</p>

<pre><code>ImproperlyConfigured at /rest-auth/registration/account-confirm-email/MTU:1bn1OD:dQ_mCYi6Zpr8h2aKS9J9BvNdDjA/
TemplateResponseMixin requires either a definition of 'template_name' or an implementation of 'get_template_names()'
</code></pre>

<p>I think I found your problem.</p>

<p>This url:</p>

<pre><code>/rest-auth/registration/account-confirm-email/MTU:1bn1OD:dQ_mCYi6Zpr8h2aKS9J9BvNdDjA/
</code></pre>

<p>is not matched by this pattern:</p>

<pre><code>url(r'^rest-auth/registration/account-confirm-email/(?P&lt;key&gt;\w+)/$', allauthemailconfirmation, name="account_confirm_email"), 
</code></pre>

<p>but by the following:</p>

<pre><code>url(r'^rest-auth/registration/', include('rest_auth.registration.urls')),
</code></pre>

<p>and if you look at the source code of <code>rest_auth.registration.urls</code>, you will see this code:</p>

<pre><code># This url is used by django-allauth and empty TemplateView is
# defined just to allow reverse() call inside app, for example when email
# with verification link is being sent, then it's required to render email
# content.

# account_confirm_email - You should override this view to handle it in
# your API client somehow and then, send post to /verify-email/ endpoint
# with proper key.
# If you don't want to use API on that step, then just use ConfirmEmailView
# view from:
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190
url(r'^account-confirm-email/(?P&lt;key&gt;[-:\w]+)/$', TemplateView.as_view(), name='account_confirm_email'),
</code></pre>

<p>So, you should overwrite this view, or you will get the error you've got, as explained here: <a href="https://github.com/Tivix/django-rest-auth/issues/20" rel="nofollow">https://github.com/Tivix/django-rest-auth/issues/20</a></p>

<p>You have indeed tried to overwrite the view, but your matching pattern is wrong, the : char causes it to fail, so let's try something like </p>

<pre><code>url(r'^rest-auth/registration/account-confirm-email/(?P&lt;key&gt;[-:\w]+)/$', allauthemailconfirmation, name="account_confirm_email"), 
</code></pre>

<p>The relevant part being: <strong>(?P[-:\w]+)/$</strong></p>

python django django-rest-framework django-allauth django-rest-auth