Add get_breadcrumbs hook to BrowseableAPIRenderer. Closes #733.

This commit is contained in:
Tom Christie 2013-04-30 14:34:03 +01:00
parent 455d7cca1e
commit 8dff8d2fdc

View File

@ -444,6 +444,9 @@ class BrowsableAPIRenderer(BaseRenderer):
def get_description(self, view):
return get_view_description(view.__class__, html=True)
def get_breadcrumbs(self, request):
return get_breadcrumbs(request.path)
def render(self, data, accepted_media_type=None, renderer_context=None):
"""
Renders *obj* using the :attr:`template` set on the class.
@ -475,7 +478,7 @@ class BrowsableAPIRenderer(BaseRenderer):
name = self.get_name(view)
description = self.get_description(view)
breadcrumb_list = get_breadcrumbs(request.path)
breadcrumb_list = self.get_breadcrumbs(request)
template = loader.get_template(self.template)
context = RequestContext(request, {