Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #16573 -- Corrected a regression in the admindocs app's view ov…

…erview introduced in r16405. Thanks, lopopolo.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a539d434d9451eb201d8b79b45740e192c1736ca 1 parent 02dcbe3
Jannis Leidel authored August 12, 2011

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  django/contrib/admindocs/views.py
12  django/contrib/admindocs/views.py
@@ -349,17 +349,17 @@ def extract_views_from_urlpatterns(urlpatterns, base=''):
349 349
     """
350 350
     views = []
351 351
     for p in urlpatterns:
352  
-        if hasattr(p, 'callback'):
353  
-            try:
354  
-                views.append((p.callback, base + p.regex.pattern))
355  
-            except ViewDoesNotExist:
356  
-                continue
357  
-        elif hasattr(p, 'url_patterns'):
  352
+        if hasattr(p, 'url_patterns'):
358 353
             try:
359 354
                 patterns = p.url_patterns
360 355
             except ImportError:
361 356
                 continue
362 357
             views.extend(extract_views_from_urlpatterns(patterns, base + p.regex.pattern))
  358
+        elif hasattr(p, 'callback'):
  359
+            try:
  360
+                views.append((p.callback, base + p.regex.pattern))
  361
+            except ViewDoesNotExist:
  362
+                continue
363 363
         else:
364 364
             raise TypeError(_("%s does not appear to be a urlpattern object") % p)
365 365
     return views

0 notes on commit a539d43

Please sign in to comment.
Something went wrong with that request. Please try again.