-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Description
I currently have a need to output an additional form at the top of the page in the Browsable API view. I'm happy creating a Renderer class with custom template to achieve this. But currently, if I want to preserve the existing functionality in the template, my only option is to copy the entire contents of the content
block from base.html
- which is less than ideal.
Breaking the content
block up into a few smaller blocks would make it easier to override just the relevant part of the template, while introducing very few downsides. For example, adding a form to the top of the page could become as simple as doing this in a custom template:
{% block request_forms %}
{{ block.super }}
<div class="my-custom-form"></div>
{% endblock %}
Metadata
Metadata
Assignees
Labels
No labels