Django 'block' tag with name 'content' appears more than once

Yes, the error is quite clear: you have two blocks named "content".

To be honest I can't understand what you're doing, as the second block seems to be an exact duplicate of the first. You can't have two extends tags either.


You can do the things you want to in the back-end, ie:- Python. You can for example do something like:-

# views.py::
if something is True(any condition for that matter)
msg = "something"

else:
msg = "Something else"

# template, it is here -- index.html::
{% block title %}{{msg}}{% endblock title %}

Tags:

Django