推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
raymanr
V2EX  ›  Python

[Flask] jinja2 将 <head> 中的内容渲染到了 <body> 最开始的部分, 这是什么原因 ?

  •  
  •   raymanr · Sep 6, 2019 · 1551 views
    This topic created in 2584 days ago, the information mentioned may be changed or developed.
    flask 1.1.1 jinja 2.10.1
    虽然已经将模板使用宏的方式替换掉模板继承回避掉了这个问题 , 但是仍然很在意 , 这是 bug 么?
    <head>
    <title>{% block title..... %}</title>
    <link .... />
    <script .... />
    </head>

    类似这样的头 , 但是渲染完成后 edge 页面的 <head/> 没有内容, 所有的 <head> 标签下的内容都到了 <body> 的最开始位置处 , 因为部分页面正常渲染部分页面异常 , 所以我尝试了下把正常页面的模板代码全部复制粘贴到异常的模板 , 结果渲染出来的页面还是异常 , 这个问题可能是在哪里呢 ?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   859 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 23:01 · PVG 07:01 · LAX 16:01 · JFK 19:01
    ♥ Do have faith in what you're doing.