aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/utils/breadcrumbs.py
diff options
context:
space:
mode:
authorBen Timby2012-01-23 13:32:37 -0500
committerBen Timby2012-01-23 13:32:37 -0500
commit7fa3a214fbd33dac61d3f8836e2c4aeda3149647 (patch)
tree82c614346b2e7c8eadc26c45e7a14038d41eee4f /djangorestframework/utils/breadcrumbs.py
parent2d8739115c8b82267f1006f636f05b116539e0dd (diff)
downloaddjango-rest-framework-7fa3a214fbd33dac61d3f8836e2c4aeda3149647.tar.bz2
Refactored get_name()/get_description()
Diffstat (limited to 'djangorestframework/utils/breadcrumbs.py')
-rw-r--r--djangorestframework/utils/breadcrumbs.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/djangorestframework/utils/breadcrumbs.py b/djangorestframework/utils/breadcrumbs.py
index cfc63a47..85e13a5a 100644
--- a/djangorestframework/utils/breadcrumbs.py
+++ b/djangorestframework/utils/breadcrumbs.py
@@ -1,6 +1,4 @@
from django.core.urlresolvers import resolve
-from djangorestframework.utils.description import get_name
-
def get_breadcrumbs(url):
"""Given a url returns a list of breadcrumbs, which are each a tuple of (name, url)."""
@@ -17,7 +15,7 @@ def get_breadcrumbs(url):
else:
# Check if this is a REST framework view, and if so add it to the breadcrumbs
if isinstance(getattr(view, 'cls_instance', None), View):
- breadcrumbs_list.insert(0, (get_name(view), url))
+ breadcrumbs_list.insert(0, (view.cls_instance.get_name(), url))
if url == '':
# All done