开始使用Django应用程序,现在只提供一些静态页面。一切似乎都在工作,但我的CSS文件试图加载的一些web字体资产得到了500http响应。在
我是指我的CSS文件使用:
这很好,但是CSS中有指向webfonts的链接,webfonts遵循FontSquirrel生成的标准格式。例如:
^{pr2}$
CSS引用了正确的文件夹(“CSS”和“fonts”文件夹在静态文件夹中处于同一级别),但终端和浏览器控制台(Chrome)都指示http500响应。在
以下是其中一个的回溯:Traceback (most recent call last):
File "C:\Server\Python34\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "C:\Server\Python34\lib\site-packages\django\contrib\staticfiles\handlers
.py", line 68, in __call__
return super(StaticFilesHandler, self).__call__(environ, start_response)
File "C:\Server\Python34\lib\site-packages\django\core\handlers\wsgi.py", line
206, in __call__
response = self.get_response(request)
File "C:\Server\Python34\lib\site-packages\django\contrib\staticfiles\handlers
.py", line 58, in get_response
return self.serve(request)
File "C:\Server\Python34\lib\site-packages\django\contrib\staticfiles\handlers
.py", line 51, in serve
return serve(request, self.file_path(request.path), insecure=True)
File "C:\Server\Python34\lib\site-packages\django\contrib\staticfiles\views.py
", line 41, in serve
return static.serve(request, path, document_root=document_root, **kwargs)
File "C:\Server\Python34\lib\site-packages\django\views\static.py", line 65, i
n serve
response["Last-Modified"] = http_date(statobj.st_mtime)
File "C:\Server\Python34\lib\site-packages\django\utils\http.py", line 109, in
http_date
rfcdate = formatdate(epoch_seconds)
File "C:\Server\Python34\lib\email\utils.py", line 181, in formatdate
now = time.gmtime(timeval)
OSError: [Errno 22] Invalid argument
[25/Apr/2014 13:19:09] "GET /static/fonts/aller_bd-webfont.svg HTTP/1.1" 500 59
谢谢你的帮助!在