我无法让Flask-Bootstrap正确渲染列

时间:2018-01-28 21:02:30

标签: python css twitter-bootstrap jinja2 flask-bootstrap

我是从Bootstrap网站复制/粘贴代码,即便如此,我也无法渲染任何内容。

而不是:

柱______________柱________________柱

我明白了:



__初始化__。PY

from flask import Flask
from flask_bootstrap import Bootstrap

app = Flask(__name__)
bootstrap = Bootstrap(app)

from app import routes

base.html文件

{% extends "bootstrap/base.html" %}

    {% block content %}
        <div class="container">
            {% block app_content %}
            {% endblock %}
        </div>
    {% endblock %}

的index.html

{% extends "base.html" %}

{% block app_content %}

    <div class="container-fluid">
      <div class="row">
        <div class="col-md-2">
          One of three columns
        </div>
        <div class="col-md-8">
          One of three columns
        </div>
        <div class="col-md-2">
          One of three columns
        </div>
      </div>
    </div>


{% endblock %}

0 个答案:

没有答案