web/lib/django/shortcuts/__init__.py
changeset 29 cc9b7e14412b
parent 0 0d40e90630ef
--- a/web/lib/django/shortcuts/__init__.py	Wed May 19 17:43:59 2010 +0200
+++ b/web/lib/django/shortcuts/__init__.py	Tue May 25 02:43:45 2010 +0200
@@ -49,6 +49,9 @@
     try:
         return redirect_class(urlresolvers.reverse(to, args=args, kwargs=kwargs))
     except urlresolvers.NoReverseMatch:
+        # If this is a callable, re-raise.
+        if callable(to):
+            raise
         # If this doesn't "feel" like a URL, re-raise.
         if '/' not in to and '.' not in to:
             raise