我正在學習如何使用 Django 模板,但我收到此錯誤
Unclosed tag on line 6: 'with'. Looking for one of: endwith.
這是我的 html 代碼
<!DOCTYPE html>
<html>
<body>
<h1>Favorite rapper:</h1>
{% with person="2pac" %}
<h1>{{person}}</h1>
</body>
</html>
這是我正在做的教程
uj5u.com熱心網友回復:
該錯誤完全有道理,您應該關閉with標簽,以便:
<!DOCTYPE html>
<html>
<body>
<h1>Favorite rapper:</h1>
{% with person="2pac" %}
<h1>{{person}}</h1>
{% endwith %}
</body>
</html>
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/535195.html
標籤:Python网页格式姜戈
