From 226ab592e2ef50c96cb1005eb7338552feef4735 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 1 Apr 2009 18:34:31 +0000 Subject: [PATCH] Fixed #8889: make admindocs function view work with class-based views. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10337 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admindocs/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admindocs/views.py b/django/contrib/admindocs/views.py index 55960cfec5..1d654df082 100644 --- a/django/contrib/admindocs/views.py +++ b/django/contrib/admindocs/views.py @@ -129,7 +129,7 @@ def view_index(request): 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,