flask - TemplateSyntaxError: Encountered unknown tag 'endblock'
问题描述
layout.html :-
<!DOCTYPE html>
<html>
<head>
<script src="https://d3js.org/d3.v4.min.js"></script>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/styles.css') }}">
</head>
<body>
<div id="header">
<label id="headLabel"></label>
</div>
<div id="sidePanel">
</div>
<div id="content">
{% block content %}
{% endblock content %}
</div>
<div id="footer">
<label id="footerLabel">Created By: Anish Saha</label>
</div>
</body>
</html>
home.html :-
{% extends "layout.html" %}
(% block content %}
<h1>Hello</h1>
{% endblock content %}
Error: TemplateSyntaxError: Encountered unknown tag 'endblock'.
Kindly help, I'm new to using flask
解决方案
你有错字
(% block content %}
更改(
为{
:
{% block content %}
推荐阅读
- azure - Azure 功能 - 有机会通过 apt-get 安装软件包吗?
- java - 如何在基于 PKCS11 的 SafeNet HSM 中生成具有脑池曲线的 ECDSA 密钥?
- asp.net-mvc - 输入类型文件需要在流利的验证中验证
- amazon-web-services - awscli 并根据时间戳将文件移动到 s3 存储桶
- r - 如何删除 NA(空)顶点
- prepros - Prepros ftp 上传超时
- seaweedfs - 如何在指定的卷服务器上预先分配卷以平衡卷?
- c - c中结构数组的大小是否有限制
- python - Python Selenium - 通过滚动缩小?
- hyperledger-fabric - 运行订单和对等时出现 Hyper ledger 多主机设置错误