Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#537 closed defect (fixed)

Typo in patch committed to svn

Reported by: fonso Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


There's been an error:

Traceback (most recent call last):

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/handlers/", line 64, in get_response
    response = callback(request, **param_dict)

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/views/admin/", line 104, in view_index
    view_functions = extract_views_from_urlpatterns(urlconf.urlpatterns)

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/views/admin/", line 300, in extract_views_from_urlpatterns
    raise TypeError, "%s does not appear to be a urlpattern object" % p

TypeError: <django.core.urlresolvers.RegexURLResolver object at 0x408a84ec> does not appear to be a urlpattern object

A patch (also attached):

Index: django/core/
--- django/core/	(revision 661)
+++ django/core/	(working copy)
@@ -78,6 +78,10 @@
             return self._urlconf_module
     urlconf_module = property(_get_urlconf_module)
+    def _get_url_patterns(self):
+        return self.urlconf_module.urlpatterns
+    url_patterns = property(_get_url_patterns)
     def _resolve_special(self, view_type):
         callback = getattr(self.urlconf_module, 'handler%s' % view_type)
         mod_name, func_name = get_mod_func(callback)

Attachments (1)

urlresolvers.patch (615 bytes) - added by fonso 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by fonso

Attachment: urlresolvers.patch added

comment:1 Changed 13 years ago by fonso

Summary: [patch] TypeError raisend in /<admin>/doc/views[patch] TypeError raised in /<admin>/doc/views

comment:2 Changed 13 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [718]) Fixed #537; thanks, fonso

comment:3 Changed 13 years ago by Esaj

Resolution: fixed
Status: closedreopened
Summary: [patch] TypeError raised in /<admin>/doc/viewsTypo in patch committed to svn

I think there's been a typo in the code committed to svn. It should be

return self.urlconf_module.urlpatterns


return self.urlconf_module.patterns

comment:4 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: reopenedclosed

(In [719]) Fixed #537 -- Fixed typo in [718]. Thanks, Esaj

Note: See TracTickets for help on using tickets.
Back to Top