mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-14 05:36:58 +03:00
Add urls, when in DEBUG mode to view error pages
This commit is contained in:
parent
e6199aa1dc
commit
c6e3d23a52
|
@ -22,3 +22,13 @@ urlpatterns = [
|
||||||
|
|
||||||
|
|
||||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
# This allows the error pages to be debugged during development, just visit
|
||||||
|
# these url in browser to see how these error pages look like.
|
||||||
|
urlpatterns += [
|
||||||
|
url(r'^400/$', 'django.views.defaults.bad_request'),
|
||||||
|
url(r'^403/$', 'django.views.defaults.permission_denied'),
|
||||||
|
url(r'^404/$', 'django.views.defaults.page_not_found'),
|
||||||
|
url(r'^500/$', 'django.views.defaults.server_error'),
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user