V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
ChanneW
V2EX  ›  问与答

jinja2 模版的一个奇怪问题

  •  
  •   ChanneW · Nov 16, 2015 · 2628 views
    This topic created in 3822 days ago, the information mentioned may be changed or developed.
    这么简单的一段代码

    ```
    <!doctype html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title></title>
    <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">

    </head>
    <body>


    <div class="subcontent">


    <!-- Split button -->
    <div class="btn-group" >
    <button type="button" class="btn btn-danger">Action</button>
    <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
    </button>
    <ul class="dropdown-menu">
    <li><a href="#">Action</a></li>
    <li><a href="#">Another action</a></li>
    <li><a href="#">Something else here</a></li>
    <li role="separator" class="divider"></li>
    <li><a href="#">Separated link</a></li>
    </ul>
    </div>


    </div>

    </body>
    </html>
    ```
    正常显示,或者直接 render 都是显示这样的:



    但是如果我把头部提取出去,使用模版继承,或者 include 模版,右键查看代码是一样的,但是出来的效果却是这样:



    问题在哪里?
    1 replies    2015-11-16 14:45:11 +08:00
    ChanneW
        1
    ChanneW  
    OP
       Nov 16, 2015
    没有人遇到这个问题,还是我提问的方式不对?怎么有种在玩单机版的感觉。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   939 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:16 · PVG 07:16 · LAX 16:16 · JFK 19:16
    ♥ Do have faith in what you're doing.