1
0
mirror of https://github.com/django/django.git synced 2024-11-19 07:54:07 +00:00
django/tests/regressiontests/urlpatterns_reverse/erroneous_urls.py
Julien Phalip 1af0271d7c Fixed #6170 -- Ensured that a useful exception is raised when a regex is invalid in the URLConf.
Thanks to abrahamson.j for the report, to guettli for initial work on the patch, and to David Gouldin for the new patch and test.
2012-07-21 13:30:34 -07:00

17 lines
812 B
Python

from django.conf.urls import patterns, url
urlpatterns = patterns('',
# View has erroneous import
url(r'erroneous_inner/$', 'regressiontests.urlpatterns_reverse.views.erroneous_view'),
# Module has erroneous import
url(r'erroneous_outer/$', 'regressiontests.urlpatterns_reverse.erroneous_views_module.erroneous_view'),
# View does not exist
url(r'missing_inner/$', 'regressiontests.urlpatterns_reverse.views.missing_view'),
# View is not callable
url(r'uncallable/$', 'regressiontests.urlpatterns_reverse.views.uncallable'),
# Module does not exist
url(r'missing_outer/$', 'regressiontests.urlpatterns_reverse.missing_module.missing_view'),
# Regex contains an error (refs #6170)
url(r'(regex_error/$', 'regressiontestes.urlpatterns_reverse.views.empty_view'),
)