Flask返回304错误视图

时间:2018-02-17 15:04:41

标签: flask twitter-bootstrap-3

我正在使用flask,我没有获得我的网页视图。 Flask服务器返回给我

127.0.0.1 - - [17/Feb/2018 15:26:09] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [17/Feb/2018 15:26:09] "GET /static/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1" 304 -
127.0.0.1 - - [17/Feb/2018 15:26:09] "GET /static/vendor/font-awesome/css/font-awesome.min.css HTTP/1.1" 304 -
127.0.0.1 - - [17/Feb/2018 15:26:09] "GET /static/vendor/magnific-popup/magnific-popup.css HTTP/1.1" 304 -
127.0.0.1 - - [17/Feb/2018 15:26:09] "GET /static/css/creative.min.css HTTP/1.1" 304 -
127.0.0.1 - - [17/Feb/2018 15:26:09] "GET /favicon.ico HTTP/1.1" 404 -

我的_nav.html。那里有css和js文件的链接。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="{{url_for('static', filename='vendor/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet">
    <link href="{{url_for('static', filename='vendor/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet" type="text/css">
    <link href="{{url_for('static', filename='vendor/magnific-popup/magnific-popup.css')}}" rel="stylesheet">
    <link href="{{url_for('static', filename='css/creative.min.css')}}" rel="stylesheet">
    <title>Title</title>
</head>
<body id="page-top">

    <nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span> Menu <i class="fa fa-bars"></i>
                </button>
                <a class="navbar-brand page-scroll" href="#page-top">Start Bootstrap</a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a class="page-scroll" href="#about">About</a>
                    </li>
                    <li>
                        <a class="page-scroll" href="#services">Services</a>
                    </li>
                    <li>
                        <a class="page-scroll" href="#portfolio">Portfolio</a>
                    </li>
                    <li>
                        <a class="page-scroll" href="#contact">Contact</a>
                    </li>
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>


</body>
</html>

我在浏览器中看不到任何类似的视图

注意:这是一个自举模板

1 个答案:

答案 0 :(得分:1)

这不是错误。 HTTP 304的意思是Not Modified,即客户端已经缓存了资源。您应该清除缓存并重试。