Author: jacob
Date: 2009-04-01 13:34:31 -0500 (Wed, 01 Apr 2009)
New Revision: 10337

Modified:
   django/trunk/django/contrib/admindocs/views.py
Log:
Fixed #8889: make admindocs function view work with class-based views.

Modified: django/trunk/django/contrib/admindocs/views.py
===================================================================
--- django/trunk/django/contrib/admindocs/views.py      2009-04-01 18:20:53 UTC 
(rev 10336)
+++ django/trunk/django/contrib/admindocs/views.py      2009-04-01 18:34:31 UTC 
(rev 10337)
@@ -129,7 +129,7 @@
             site_obj = GenericSite()
         for (func, regex) in view_functions:
             views.append({
-                'name': func.__name__,
+                'name': hasattr(func, '__class__') and func.__class__.__name__ 
or func.__name__,
                 'module': func.__module__,
                 'site_id': settings_mod.SITE_ID,
                 'site': site_obj,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to