mirror of
https://github.com/ansible/awx.git
synced 2026-04-03 17:25:08 -02:30
Reorder URLs so that Django debug toolbar can work (#16352)
* Reorder URLs so that Django debug toolbar can work * Move comment with URL move
This commit is contained in:
@@ -34,9 +34,6 @@ def get_urlpatterns(prefix=None):
|
||||
re_path(r'^(?:api/)?500.html$', handle_500),
|
||||
re_path(r'^csp-violation/', handle_csp_violation),
|
||||
re_path(r'^login/', handle_login_redirect),
|
||||
# want api/v2/doesnotexist to return a 404, not match the ui urls,
|
||||
# so use a negative lookahead assertion here
|
||||
re_path(r'^(?!api/).*', include('awx.ui.urls', namespace='ui')),
|
||||
]
|
||||
|
||||
if settings.DYNACONF.is_development_mode:
|
||||
@@ -47,6 +44,12 @@ def get_urlpatterns(prefix=None):
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# want api/v2/doesnotexist to return a 404, not match the ui urls,
|
||||
# so use a negative lookahead assertion in the pattern below
|
||||
urlpatterns += [
|
||||
re_path(r'^(?!api/).*', include('awx.ui.urls', namespace='ui')),
|
||||
]
|
||||
|
||||
return urlpatterns
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user