1. Andy Mikhailenko
  2. django-navigation


Andy Mikhailenko  committed fe2cb41

Bugfix: Reolver404 exception would propagate if the full URL path was correct but a part of if could not be resolved (e.g. "/accounts/login/" was registered but "/acoounts/" did not exist in the URL map). Now this is correctly handled by find_crumb.

  • Participants
  • Parent commits 968ad41
  • Branches default

Comments (0)

Files changed (2)

File navigation/__init__.py

View file
  • Ignore whitespace
 __author__  = 'Andy Mikhailenko'
 __license__ = 'GNU Lesser General Public License (GPL), Version 3'
 __url__     = 'http://bitbucket.org/neithere/django-navigation/'
-__version__ = '0.5.1'
+__version__ = '0.5.2'

File navigation/resolvers.py

View file
  • Ignore whitespace
     must follow the views API (i.e. the only required argument is request
     object). It is also expected to return a `unicode` value.
-    callback, args, kwargs = _resolve_url(request, url)
+    try:
+        callback, args, kwargs = _resolve_url(request, url)
+    except urlresolvers.Resolver404:
+        return None
     bc = getattr(callback, 'breadcrumb', None)
     if bc is None:
         bc = getattr(callback, 'navigation', None)