﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29611	Reverse and built-in template tag 'url' does not work exactly the same way.	Dr. Shubham Dipt	nobody	"Reverse: looks for the provided url name in each app in order of the apps mentioned in the INSTALLED_APPS in settings.py, however the url tag looks for the url name in the order of the urls provided in project/urls.py. If two urls with the same url name is provided but in different order in urls.py and different order of the respective app in INSTALLED_APPS, then the results (the final URL) will be different.

To explain the problem, lets have the example for url name: ""login""
Order of INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',  # There lies a url named login with pattern /accounts/login
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'custom_app',
]


Now in the project/urls.py, I provide a different pattern for 'login',

urlpatterns = [
    # Auth urls
    re_path(r'^login/$', auth_views.login, name='login'),  # I removed the default accounts prefix from the login url
]

Now, in this case if I do:
reverse(""login"")  -> the result will be /accounts/login
but if I do: url 'login' in a template -> the result will be /login/"	Bug	new	Core (URLs)	2.0	Normal		reverse, url, template tag		Unreviewed	0	0	0	0	0	0
