diff --git a/rest_framework/templates/rest_framework/docs/_recursive_document.html b/rest_framework/templates/rest_framework/docs/_recursive_document.html index d1596b454..fcdbf5c80 100644 --- a/rest_framework/templates/rest_framework/docs/_recursive_document.html +++ b/rest_framework/templates/rest_framework/docs/_recursive_document.html @@ -1,15 +1,16 @@ {% load rest_framework %} {% for section_key, section in items %} -{% if section_key %} - {{ section_key }} - -{% endif %} + {% if section_key %} + + {{ section_key }} + + + {% endif %} {% if section.links|items %} {% for link_key, link in section.links|items %} - {% include "rest_framework/docs/link.html" with prefix=prefix level=level|add:1%} + {% include "rest_framework/docs/link.html" with path=path %} {% endfor %} {% endif %} - {% include 'rest_framework/docs/_recursive_document.html' with items=section.data|items prefix=prefix|add:section_key|add:'/' level=level|add:1 %} + {% include 'rest_framework/docs/_recursive_document.html' with items=section.data|items path=path|list_add:section_key level=level|add:1 %} {% endfor %} - diff --git a/rest_framework/templates/rest_framework/docs/_recursive_menu.html b/rest_framework/templates/rest_framework/docs/_recursive_menu.html index 82775dd02..bb86a87c5 100644 --- a/rest_framework/templates/rest_framework/docs/_recursive_menu.html +++ b/rest_framework/templates/rest_framework/docs/_recursive_menu.html @@ -1,22 +1,18 @@ {% load rest_framework %} {% if items %} -