Getting started on a Django application and just serving up some static pages for now. Everything seems to be working but I am getting a 500 HTTP response for some of the web font assets that my CSS file is trying to load.
I am referring to my CSS file using:
<link rel="stylesheet" type="text/css" href="{% static "css/styles.css" %}">
Which works fine, but within the CSS are links to webfonts, which is following the standard format generated by FontSquirrel. For example:
@font-face {
font-family: 'allerbold';
src: url("../fonts/aller_bd-webfont.eot");
src: url("../fonts/aller_bd-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/aller_bd-webfont.woff") format("woff"), url("../fonts/aller_bd-webfont.ttf") format("truetype"), url("../fonts/aller_bd-webfont.svg#allerbold") format("svg");
font-weight: normal;
font-style: normal; }
The CSS is referencing the correct folder (the 'css' and 'fonts' folders are on the same level in the static folder) but both terminal and the browser console (Chrome) are indicating a HTTP 500 response.
Here's the traceback for one of these:
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
Thanks for any help!