diff options
| author | Tom Christie | 2013-04-23 11:59:13 +0100 |
|---|---|---|
| committer | Tom Christie | 2013-04-23 11:59:13 +0100 |
| commit | 835d3f89d37b873b2ef96dc7d71922b035b07328 (patch) | |
| tree | bee0cdaac6e4fcaefd7fd83e9b9210d103e379af /rest_framework/utils/breadcrumbs.py | |
| parent | 4bf1a09baeb885863e6028b97c2d51b26fb18534 (diff) | |
| parent | d75cebf75696602170a9d282d4b114d01d6e5d8e (diff) | |
| download | django-rest-framework-835d3f89d37b873b2ef96dc7d71922b035b07328.tar.bz2 | |
Merge remove-django-generics
Diffstat (limited to 'rest_framework/utils/breadcrumbs.py')
| -rw-r--r-- | rest_framework/utils/breadcrumbs.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rest_framework/utils/breadcrumbs.py b/rest_framework/utils/breadcrumbs.py index af21ac79..18b3b207 100644 --- a/rest_framework/utils/breadcrumbs.py +++ b/rest_framework/utils/breadcrumbs.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals from django.core.urlresolvers import resolve, get_script_prefix +from rest_framework.utils.formatting import get_view_name def get_breadcrumbs(url): @@ -16,11 +17,11 @@ def get_breadcrumbs(url): pass else: # Check if this is a REST framework view, and if so add it to the breadcrumbs - if isinstance(getattr(view, 'cls_instance', None), APIView): + if issubclass(getattr(view, 'cls', None), APIView): # Don't list the same view twice in a row. # Probably an optional trailing slash. if not seen or seen[-1] != view: - breadcrumbs_list.insert(0, (view.cls_instance.get_name(), prefix + url)) + breadcrumbs_list.insert(0, (get_view_name(view.cls), prefix + url)) seen.append(view) if url == '': |
