[Answer]-Dynamic variable in base.html – Django

1👍

You can do

index.html

{% extends 'base.html' %}

{% block content %}

{% endblock content %}

and in

base.html

<doctype ...>
...

{% block content %}
{% endblock content %}

...

Here, the index.html would extend (inherit) from base.html, and render the contents in {% block content %}

Leave a comment