1👍
✅
If you can change a bit your base.html template
{% block content_wrapper %}
<div class="container">
{% block content %}
{% endblock content %}
</div>
{% endblock content_wrapper %}
Then in your few specifics template you can override the content_wrapper
block.
0👍
The easiest way as I see it is to create another base template that you extend. Perhaps calling it base-purpose.html. Another way could be to use the {% include 'another.html' %}
tag. This might be able to solve your problem as well.
See the discussion between include and extend on stackoverflow
- [Answer]-Django – Permission denied to open media in production server (Azure)
- [Answer]-Form.is_valid(): always returns false
- [Answer]-Accessing extended User class fields
- [Answer]-Django CreateView demands pk
- [Answer]-Django on a Mac
Source:stackexchange.com