Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python CSS赢得';t用烧瓶装填_Python_Html_Css_Twitter Bootstrap_Flask - Fatal编程技术网

Python CSS赢得';t用烧瓶装填

Python CSS赢得';t用烧瓶装填,python,html,css,twitter-bootstrap,flask,Python,Html,Css,Twitter Bootstrap,Flask,我使用PythonFlask构建了我的后端,并使用基本的HTML模板测试了它,没有CSS,并且没有任何问题。然而,当我尝试实现引导时,它不会加载css。我已经将css和js文件放在一个静态文件夹中 以下是引导HTML标记: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" con

我使用PythonFlask构建了我的后端,并使用基本的HTML模板测试了它,没有CSS,并且没有任何问题。然而,当我尝试实现引导时,它不会加载css。我已经将css和js文件放在一个静态文件夹中

以下是引导HTML标记:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head     content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Simple Safety</title>

    <!-- Bootstrap core CSS -->
    <link href="{{ url_for('static', filename ='bootstrap.min.css') }}" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="{{ url_for('static', filename =ie10-viewport-bug-workaround.css') }}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="{{ url_for('static', filename ='style.css') }}" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]
    <script type="text/javascript" src="{{ url_for('static', filename = 'ie-emulation-modes-warning.js') }}"></script>-->

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js">    </script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js">    </script>
    <![endif]-->
    </head>

<!--Main Content-->

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="{{url_for('https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/', filename='jquery.min.js') }}"></script>
    <script>window.jQuery || document.write("<script type='text/javascript' src='{{ url_for('static', filename='jquery.min.js') }}''><\/script>")</script>
    <script type="text/javascript" src="{{ url_for('static', filename ='bootstrap.min.js') }}"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script type="text/javascript" src="{{ url_for('static', filename='ie10-viewport-bug-workaround.js') }}"></script>
  </body>
</html>

简单安全

window.jQuery | | document.write("我意识到我已经将“静态”文件夹放在了“模板”文件夹中,这是我对仅前端应用程序的一个老习惯。你需要将“静态”文件夹放在与模板文件夹一起的目录中。

我意识到我已经将“静态”文件夹放在了“模板”文件夹中,这是我对仅前端应用程序的一个老习惯。哟你需要把“静态”文件夹放在templates文件夹所在的目录中