当调试设置为False且allowed_hosts设置为'*'时,不会加载静态文件

时间:2013-08-06 19:42:25

标签: python django

<head>
<title>My website</title>
<meta charset="utf-8">
{% load static from staticfiles %}
<link type="text/css" rel="stylesheet" href="{% static "mysite/css/base.css" %}" />
</head>

这就是我在模板中使用的内容。当debug设置为true时,一切都很好,但当我将其翻转为false时,并将allowed_hosts设置为&#39; *&#39; (用于测试),css和静态文件无效..

0 个答案:

没有答案
相关问题