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

报错详情:

Exception: Unexpected end of template. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.Exception: Unexpected end of template. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.
127.0.0.1 - - [26/Dec/2018 12:29:38] "GET /admin/login/ HTTP/1.1" 302 -Exception: Unexpected end of template. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.
127.0.0.1 - - [26/Dec/2018 12:29:38] "GET /admin/login/ HTTP/1.1" 302 -

报错原因:jinja语句中 “ % ” 和 “ { ” 之间有空格

{% for msg in get_flashed_messages() %}<p class="login-box-msg" style="color: red">{{ msg }}</p>
{  % endfor %}

解决方法:去除空格

{% for msg in get_flashed_messages() %}<p class="login-box-msg" style="color: red">{{ msg }}</p>
{% endfor %}

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

  1. javafx-更改webview中的html元素报错Exception in thread “JavaFX Application Thread“ netscape.javascript.JSExce

    具体报错 Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: Synt ...

  2. 【错误记录】Android Studio Logcat 报错 ( read: unexpected EOF! )

    文章目录 一.报错信息 二.解决方案 一.报错信息 Android Studio 运行一段时间后 , 出现 Logcat 不打印日志的情况 ; 报错 : read: unexpected EOF! 二 ...

  3. Javafx 报错Exception in Application start method java.lang.reflect.InvocationTargetException

    Javafx 报错Exception in Application start method java.lang.reflect.InvocationTargetException 代码如下: imp ...

  4. 浏览器报错:unexpected end of input 解决方法

    浏览器报错:unexpected end of input 解决方法 参考文章: (1)浏览器报错:unexpected end of input 解决方法 (2)https://www.cnblog ...

  5. 报错SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (<anonymous>)的解决方法

    报错SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse ()的解决方法 刚刚开始学习node.js会报很多各种各样的 ...

  6. 93.<报错 SyntaxError: Unexpected token R in JSON at position 0 at JSON.parse (<anonymous>)的解决方法>

    @[TOC]( 报错 SyntaxError: Unexpected token R in JSON at position 0 at JSON.parse ()的解决方法) 报错代码: const ...

  7. Flask报错:sqlite3.IntegrityError: NOT NULL constraint failed: step. date

    Flask报错:sqlite3.IntegrityError: NOT NULL constraint failed: step. date 报错如图 解决方法 报错如图 解决方法 开始: db=co ...

  8. 报错 SyntaxError: Unexpected token R in JSON at position 0 at JSON.parse (<anonymous>)的解决方法

    报错 SyntaxError: Unexpected token R in JSON at position 0 at JSON.parse ()的解决方法 报错代码: let articles = ...

  9. 【kettle】【报错】 Unexpected problem reading shared objects from XML file 当读共享文件时发生错误

    ETL报错: Unexpected problem reading shared objects from XML file : null 当读共享文件时发生错误(继续加载 报 kettle新建转换 ...

最新文章

  1. 如何处理JSON中的特殊字符 介绍几种解决方案
  2. editplus的配置和使用
  3. 数据库复习1——数据库体系结构和关系系统
  4. 某大型数据中心离心式冷水机组 控制板UPS电源改造项目案例分享
  5. php的miss路由,ThinkPHP6.0 MISS路由 - ThinkPHP6.0快速开发手册(案例版) - php中文网手册...
  6. 在SAP Data Intelligence Modeler里测试data Generator graph
  7. ASP.NET伪静态-无法读取配置文件,因为它超过了最大文件大小的解决办法
  8. 为对象添加方法mothod
  9. 90后中国程序员“黑吃黑”博彩网站,半年获利256万,判刑11年半
  10. python矩阵转置与zip(*)的使用
  11. 软件测试简历,这一点你是否漏掉
  12. Unity 接入百度AI - Logo商标识别
  13. base64解码成16进制字符串--python3
  14. Android开发-高德地图导航
  15. 【数字IC/FPFA】时序约束--时钟约束
  16. [移动端开发]到底什么是WebView?
  17. 《九宫格记忆网配置使用说明》
  18. 恒相电子画册项目使用unxt框架打正式版 使用nginx发布项目失败解决方案
  19. 红牛农场JAVA_JAVA内部类与异常类
  20. 中秋将至,想吃月饼了吗?

热门文章

  1. 华为——让华盛顿感到恐慌的中国公司(转载)
  2. Unity3D制作简单的太阳系
  3. 如何改变照片的大小kb?照片怎么改到100kb?
  4. 开心网android客户端,开心网Android客户端升级 加强移动社交服务
  5. DOS命令:copy
  6. 真实评测 r5 3400g和r5 5600g 选哪个
  7. iso 加入usb驱动_如何查看DVD,ISO或USB驱动器上的Windows版本和内部版本
  8. 如何在VirtualBox中利用共享文件来实现文件共享
  9. 这个清明节我要学习微服务架构下分布式事务Seata
  10. 回归预测鲍鱼年龄案例