Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Lint
  • Loading branch information
olliewalsh committed Aug 14, 2015
commit 332c30afb9f710653843c6d6746be613a9fd638d
3 changes: 0 additions & 3 deletions rest_framework/utils/breadcrumbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ def get_breadcrumbs(url, request=None):
tuple of (name, url).
"""
from rest_framework.reverse import preserve_builtin_query_params
from rest_framework.settings import api_settings
from rest_framework.views import APIView

view_name_func = api_settings.VIEW_NAME_FUNCTION

def breadcrumbs_recursive(url, breadcrumbs_list, prefix, seen):
"""
Add tuples of (name, url) to the breadcrumbs list,
Expand Down
3 changes: 2 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class NestedResourceRoot(APIView):
class NestedResourceInstance(APIView):
pass


class CustomNameResourceInstance(APIView):
def get_view_name(self):
return "Foo"
Expand Down Expand Up @@ -89,7 +90,7 @@ def test_resource_instance_customname_breadcrumbs(self):
('Resource Root', '/resource/'),
('Foo', '/resource/customname')
]
)
)

def test_nested_resource_breadcrumbs(self):
url = '/resource/123/'
Expand Down