静态目录结构:
website
--css
--js
--images
--landinpage.png
Apache访问日志: 在
^{pr2}$HTML代码:
<code>
<!-- Styles -->
<link rel="stylesheet" type="text/css" href="/static/website/css/style.css"/>
<style>
body {
background: white url("/static/website/images/landinpage.png");
</code>
我可以看到/static/website/css/样式.css正确加载(因此apache日志中有200个服务器响应),但当服务器尝试加载/static/website/images时/登陆页面.png我收到404的回复。 我已经核实了文件名和位置
如果是静态服务器apache2:
在设置.py添加静态目录
收集静态目录
^{pr2}$在apache conf中添加路径
如果开发服务器。
模板上下文处理器设置.py
网址.py
相关问题 更多 >
编程相关推荐