mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Lint
This commit is contained in:
parent
3d0292e1cd
commit
332c30afb9
|
@ -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,
|
||||
|
|
|
@ -31,6 +31,7 @@ class NestedResourceRoot(APIView):
|
|||
class NestedResourceInstance(APIView):
|
||||
pass
|
||||
|
||||
|
||||
class CustomNameResourceInstance(APIView):
|
||||
def get_view_name(self):
|
||||
return "Foo"
|
||||
|
@ -89,7 +90,7 @@ class BreadcrumbTests(TestCase):
|
|||
('Resource Root', '/resource/'),
|
||||
('Foo', '/resource/customname')
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
def test_nested_resource_breadcrumbs(self):
|
||||
url = '/resource/123/'
|
||||
|
|
Loading…
Reference in New Issue
Block a user