0

I have the following in the main url.py file

url(r'^authentication/', include(authentication.urls.urlpatterns)),

and the following line in the auth url.py

url(r'confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', confirm_email_with_token, name="confirm_email"),

and when I try to render the reverse url like so

{% url 'confirm_email' uidb64=uid token=token %}

I get the following

django.urls.exceptions.NoReverseMatch: Reverse for 'confirm' with keyword arguments '{'uidb64': b'MTU', 'token': '4sk-9bb9de4589dcfd386fdc'}' not found. 1 pattern(s) tried: ['authentication/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$']

Reverse lookup for the passwordresetview also defined in the authentication urls is working fine.

I'm sure it is something trivial that I'm missing but I can't seem to figure out what.

I'm using django 2 and python 3.6

Simon Means
  • 230
  • 3
  • 11
  • @Alasdair thank you for pointing me to that question. Sorry for the spam, I looked at similar questions and genuinely didn't find that :( – Simon Means Jan 04 '18 at 16:24
  • No problem! I wouldn't expect you to find that question, it takes me a minute to find it and I already know it's there. I renamed the title of the duplicate target, hopefully it will be easier to find in future. – Alasdair Jan 04 '18 at 16:57

0 Answers0