diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2006-10-09 23:24:48 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2006-10-09 23:24:48 +0000 |
| commit | aaa3411a0ab940c46a9e19e6eea5907dc86557fa (patch) | |
| tree | 723476d1c3d3d0c287ca00a2e8edbe04cf1ad8a3 | |
| parent | afd9b8771140a706337c988e7c383a310bc751ab (diff) | |
Made the !NoReverseMatch exception fail silently within templates (so that model.permalink doesn't cause templates to break for a broken permalink function).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/urlresolvers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py index 2f557b90a6..45705cb223 100644 --- a/django/core/urlresolvers.py +++ b/django/core/urlresolvers.py @@ -15,7 +15,8 @@ class Resolver404(Http404): pass class NoReverseMatch(Exception): - pass + # Don't make this raise an error when used in a template. + silent_variable_failure = True def get_mod_func(callback): # Converts 'django.views.news.stories.story_detail' to |
