aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils/breadcrumbs.py
diff options
context:
space:
mode:
authorTom Christie2013-04-26 14:59:21 +0100
committerTom Christie2013-04-26 14:59:21 +0100
commit8fa79a7fd38dda015afa658084361c6da2856e46 (patch)
treeef8080a9d24b488402429c0bae101e3f395f1f8b /rest_framework/utils/breadcrumbs.py
parente301e2d974649a932ab9a7ca32199c068fa30495 (diff)
downloaddjango-rest-framework-8fa79a7fd38dda015afa658084361c6da2856e46.tar.bz2
Deal with List/Instance suffixes for viewsets
Diffstat (limited to 'rest_framework/utils/breadcrumbs.py')
-rw-r--r--rest_framework/utils/breadcrumbs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/utils/breadcrumbs.py b/rest_framework/utils/breadcrumbs.py
index 18b3b207..8f8e5710 100644
--- a/rest_framework/utils/breadcrumbs.py
+++ b/rest_framework/utils/breadcrumbs.py
@@ -21,7 +21,8 @@ def get_breadcrumbs(url):
# 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, (get_view_name(view.cls), prefix + url))
+ suffix = getattr(view, 'suffix', None)
+ breadcrumbs_list.insert(0, (get_view_name(view.cls, suffix), prefix + url))
seen.append(view)
if url == '':