Django模板是我的工作空間/項目名稱/模板/應用程序的名字裏面的index.html文件顯示html標籤,因爲它是低於
<!DOCTYPE html>
<html>
<head>
<title>my news</title>
</head>
<body>
<h1>look below for news</h1>
{%if categories%}
<ul>
{%for category in categories%}
<li>{{category.name}}</li>
{%endfor%}
</ul>
{%endif%}
{%if headings%}
<p>
{%for heading in headings%}
<a href="#">{{heading.title}}</a>
<br>
{{heading.content}}
{%endfor%}
</p>
{%endif%}
</body>
</html>
問題<ul>
和<li>
標籤工作,顯示該表,因爲它應該這樣做。<a>
標籤也顯示一個超鏈接,但<p>
標籤和<br>
標籤沒有被呈現,並顯示爲一個文本,不能認爲可能是什麼問題。我對django相當新。