Debug check already exists in the main url file. No need to check here again.

This commit is contained in:
Demetris Stavrou 2018-11-01 13:40:10 +02:00
parent e4501ab7ff
commit 820ccd2fb6

View File

@ -9,12 +9,9 @@ from {{ cookiecutter.project_slug }}.users.views import (
) )
app_name = "users" app_name = "users"
urlpatterns = [] urlpatterns += [
path("", view=user_list_view, name="list"),
if settings.DEBUG: path("~redirect/", view=user_redirect_view, name="redirect"),
urlpatterns += [ path("~update/", view=user_update_view, name="update"),
path("", view=user_list_view, name="list"), path("<str:username>/", view=user_detail_view, name="detail"),
path("~redirect/", view=user_redirect_view, name="redirect"), ]
path("~update/", view=user_update_view, name="update"),
path("<str:username>/", view=user_detail_view, name="detail"),
]