macropin / django-registration

Django-registration (redux) provides user registration functionality for Django websites.
http://django-registration-redux.readthedocs.org
Other
974 stars 350 forks source link

NoReverseMatch for included auth_urls routes #312

Closed jwarren116 closed 6 years ago

jwarren116 commented 6 years ago

Running django-registration 1.8 and Sjango 1.11.3.

I've included the URLs found in registration/auth_urls.py. For all of the routes I'm running into Django's NoReverseMatch exception. It seems this is due to the name for each url route being prepended with auth_. For example, with the login route, the templates use {% url 'login' %}, however the url route in auth_urls.py is name=auth_login.

What am I doing wrong?

jwarren116 commented 6 years ago

Disregard. Turns out it is because I had django.contrib.admin above registration in INSTALLED_APPS, which breaks the login and password reset routes.

Would you like me to open a PR to add a note to the docs to ensure registration is above both django.contrib.auth and django.contrib.admin?

joshblum commented 6 years ago

@jwarren116 Sorry you ran into this issue! The fix you mentioned was just completed in https://github.com/macropin/django-registration/commit/97f9501d79aefe18285d85ca5354c77894bbf1d7, I'm just waiting for review on #310 before releasing the next version on pypi/updating the docs. I'm going to close this for now but if you think that any further clarification could be added, a PR would be greatly appreciated :)