Unclosed tag on line 6: 'with'. Looking for one of: endwith
Question:
I’m learning how to use Django Templates but im getting this error
Unclosed tag on line 6: 'with'. Looking for one of: endwith.
this is my html code
<!DOCTYPE html>
<html>
<body>
<h1>Favorite rapper:</h1>
{% with person="2pac" %}
<h1>{{person}}</h1>
</body>
</html>
Answers:
The error makes complete sense you should close the with
tag so:
<!DOCTYPE html>
<html>
<body>
<h1>Favorite rapper:</h1>
{% with person="2pac" %}
<h1>{{person}}</h1>
{% endwith %}
</body>
</html>
I’m learning how to use Django Templates but im getting this error
Unclosed tag on line 6: 'with'. Looking for one of: endwith.
this is my html code
<!DOCTYPE html>
<html>
<body>
<h1>Favorite rapper:</h1>
{% with person="2pac" %}
<h1>{{person}}</h1>
</body>
</html>
The error makes complete sense you should close the with
tag so:
<!DOCTYPE html>
<html>
<body>
<h1>Favorite rapper:</h1>
{% with person="2pac" %}
<h1>{{person}}</h1>
{% endwith %}
</body>
</html>