我在用flask web写前端的时候报错如上,我的html是这样写的:

<!DOCTYPE html>
<html lang="zh-CN">    <head><meta charset="utf-8"/><title>Index</title><link rel="stylesheet" href="static/main.css"></head><body>{% for course in courses %}<p>{{ course.name }} - {{ course.author.username }}</p>{ % endfor %}</body><script src="static/main.js"></script>
</html>

找了半天才发现原来endfor前面的百分号和{之间有空格,去掉空格就没问题了

报错 jinja2.exceptions.TemplateSyntaxError: Unexpected end of template. Jinja was looking for the foll相关推荐

  1. flask报错:“Exception: Unexpected end of template. Jinja was looking for the following tags: 'endfor' ”

    flask报错:"Exception: Unexpected end of template. Jinja was looking for the following tags: 'endf ...

  2. Celery 启动报错 can_read() got an unexpected keyword argument timeout

    问题: Celery 启动报错 can_read() got an unexpected keyword argument timeout 方案:更改redis版本和celery版本,我使用下面的ce ...

  3. 解决React Native报错:Error:Found unexpected optical bounds (red pixel)

    问题背景 同样是在升级 gradle plugin V2.2.3 --> gradle plugin V3.0.1后,运行至打包APK期间报错: Error:found unexpected o ...

  4. yarn报错:error An unexpected error occurred: “https://registry.yarnpkg.com/-/user/org.couchdb。。。

    Yarn 报错:error An unexpected error occurred: "https://registry.yarnpkg.com/-/user/org.couchdb.us ...

  5. npm install XXX 报错:error An unexpected error occurred:

    npm install XXX 报错:error An unexpected error occurred: "EPERM: operation not permitted 我的解决办法是: ...

  6. Rabbitmq报错pika.exceptions.IncompatibleProtocolError: StreamLostError: ('Transport indicated EOF',)

    rabbitmq 报错 pika.exceptions.IncompatibleProtocolError: StreamLostError: ('Transport indicated EOF',) ...

  7. Conda更新报错:requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://mirrors.tuna.t

    Conda更新报错:requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://mirrors.tuna.t ...

  8. npm install vue@next 是报错npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscel

    npm install vue@next 是报错 npm WARN registry Unexpected warning for https://registry.npmjs.org/: Misce ...

  9. 【shiro】使用shiro搭建的项目,页面引用js,报错:Uncaught SyntaxError: Unexpected token ...

    使用shiro搭建项目过程中,总是出现登录页面 登录第一次有效果,登陆第二次出现302状态码,第三次又有效果,第四次又没有效果的局面. 因此,采用ajax提交页面登录的用户名和密码,但是在引用js的过 ...

最新文章

  1. 用Python实现武侠小说中的武打动作残影特效
  2. PreparedStatement和Statement比较
  3. Mircosoft 正式把Windows Mobile改名为Windows Phone,你会因此而购买Windows Phone吗?
  4. virtualbox linux 挂载u盘,Ubuntu 10.04 在Virtualbox 虚拟机上挂载U盘
  5. CSS笔记-除了a标签外的hover属性的应用
  6. 去海南旅游什么时间段去最好,哪里最好玩?
  7. oracle递归树查询
  8. 计算机毕业设计php的仓库管理系统(源码+系统+mysql数据库+Lw文档)
  9. arcgis怎么压缩tif文件_pdf文件过大怎么办?3种免费压缩PDF的方法
  10. 高德地图引入热力图插件失败
  11. 50个查询系列-第13个查询:把“SC”表中“叶平”老师教的课的成绩都更改为此课程的平均成绩;...
  12. 移动端安全 | Windows11安卓子系统进行APP抓包(踩坑文)
  13. VC MFC C++ MQTT VC编译MQTT VC调用MQTT dll eclipse-paho-mqtt
  14. Jenkins流水线部署java项目
  15. 弗雷德里克·特曼:硅谷之父、斯坦福大学前副校长——(转自新浪网)
  16. js 匹配正确手机号
  17. 命名实体识别的难点与现状
  18. 【C++】之内联函数(inline)
  19. vba oracle 查询数据字典,VBA 数据字典编程求助 - Excel VBA开发 - Excel精英培训网 - Powered by Discuz!...
  20. 会员金闪闪动画字体 (CATextLayer + CAGradientLayer)

热门文章

  1. 智慧城市无线充电故障和fitbits总体规划8月以来的热门新闻
  2. android 伪装 wifi,移动数据伪装wifi软件xposed手机版-手机移动数据伪装wifi模块xposedv1.4最新版_新绿资源网...
  3. 基于单片机智能睡眠枕整套设计方案
  4. 【keil5】keil5仿真STM32设置
  5. Android引用ttf图标字体库
  6. 如何仅从 UiPath 中的数据表获取标题
  7. 将GrilView中的数据转换成DataTable
  8. 2018《财富》世界500强出炉,比500强更多的财富在这里!
  9. PVP:手游进程的终点
  10. 用Silverlight做淘宝应用