Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.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/7/css/41.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
Html django中基本模板的css_Html_Css_Django - Fatal编程技术网

Html django中基本模板的css

Html django中基本模板的css,html,css,django,Html,Css,Django,我正在尝试用模板创建我的站点。现在,我的目标是把页脚的模板。我使用相同的信息创建了base.html: <html> <head> <title>{% block title %}{% endblock %}</title> {% block url %}{% endblock %} <link rel = "stylesheet" href="{% static "app/css/base.css" %}"/>

我正在尝试用模板创建我的站点。现在,我的目标是把页脚的模板。我使用相同的信息创建了base.html:

<html>
<head>
    <title>{% block title %}{% endblock %}</title>
    {% block url %}{% endblock %}
    <link rel = "stylesheet" href="{% static "app/css/base.css" %}"/>
</head>
<body ink="#FFFFFF" alink="#fefefe" alink="#FFFFFF" vlink="#FFFFFF">
         <div class="page-wrap">{% block content %}{% endblock %}</div>

        <footer class="site-footer">
            footer information
        </footer>

</body>
</html>
base.css

* {
  margin: 0;
}
html, body {
  height: 100%;
        box-shadow: inset 36em 0 20em 1em #222222;
      opacity: 0.9;
  background-image: url(../images/photo.jpg); 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
.page-wrap {
  min-height: 100%;
  margin-bottom: -100px; 
}
.page-wrap:after {
  content: "";
  display: block;
}
.site-footer, .page-wrap:after {
  height: 100px; 
}
.site-footer {
  background: #222222;
  opacity: 1;
}
当我尝试使用此文件运行服务器时,出现错误:

TemplateSyntaxError at /
Invalid block tag: 'static'
Request Method: GET
Django Version: 1.8.4
Exception Type: TemplateSyntaxError
Exception Value:    
Invalid block tag: 'static'
In template C:\project\app\templates\app\base.html, error at line 5

Invalid block tag: 'static'     <link rel = "stylesheet" href="
      {% static "app/css/base.css" %}
      "/>
模板语法错误位于/
无效的块标记:“静态”
请求方法:获取
Django版本:1.8.4
异常类型:TemplateSyntaxError
异常值:
无效的块标记:“静态”
在模板C:\project\app\templates\app\base.html中,第5行出现错误
无效的块标记:“静态”

我如何解决这个问题?非常感谢你

{%loadstaticfiles%}
放在
base.html
里?哇,太近了。谢谢你!!!
TemplateSyntaxError at /
Invalid block tag: 'static'
Request Method: GET
Django Version: 1.8.4
Exception Type: TemplateSyntaxError
Exception Value:    
Invalid block tag: 'static'
In template C:\project\app\templates\app\base.html, error at line 5

Invalid block tag: 'static'     <link rel = "stylesheet" href="
      {% static "app/css/base.css" %}
      "/>