在家中访问数据时遇到麻烦

时间:2019-09-22 23:10:15

标签: django-templates

``为什么我的模板没有显示在服务器上?它只是html

{%  extends "blog/base.html"%}

{%  block   title   %}My Blog{% endblock    %}
{%  block   content %}
<h1>My  Blog</h1>
{%  for p in    posts   %}
<h2><a href="{{ p.get_absolute_url  }}">{{p.title}}</a></h2>
{%  endfor  %}
{%  endblock %}

我制作了一个从base.html继承的模板列表模板文件,它工作正常,但是模板不显示数据。在服务器上,它只有html标签而不是{} jinja

0 个答案:

没有答案