1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #10802 -- Handle ImportErrors and AttributeErrors gracefully when raised by the URL resolver system during startup. Many thanks, IonelMaries and Bas Peschier.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel
2011-06-16 16:41:14 +00:00
parent 30e842632e
commit b4cdf4d111
5 changed files with 55 additions and 20 deletions

View File

@@ -0,0 +1,14 @@
from django.conf.urls.defaults 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'),
)