4

I know in Apache One adds

RewriteEngine On
RewriteRule !(\.ico\.gif|\.png|\.jpe?g|\.css|\.js|\.php|\.eot|\.svg|\.ttf|\.woff|\.otf|^public/.*)$ index.php [nocase,last]

but How I do with Django, these rules

madhu131313
  • 7,003
  • 7
  • 40
  • 53

1 Answers1

4

So, you are serving static files in Django dev server?

In settings.py I think you need:

if DEBUG:
    import mimetypes
    mimetypes.add_type("application/font-woff", ".woff", True)

...from info given in these questions on SO:

Resource interpreted as Font but transferred with MIME type application/x-font-woff
Django development server and MIME types

Community
  • 1
  • 1
Anentropic
  • 32,188
  • 12
  • 99
  • 147
  • great, awesome, nice.As I am using google maps API, My django server is not serving the .woff files but from google server with this error in console `Resource interpreted as Font but transferred with MIME type font/woff: "https://themes.googleusercontent.com/static/fonts/roboto/v9/RxZJdnzeo3R5zSexge8UUT8E0i7KZn-EPnyo3HZu7kw.woff"`, so how I can solve this? – madhu131313 Aug 27 '13 at 21:21
  • 2
    It is only a Warning from Chrome, not an Error. You can safely ignore the warning. In future versions of Chrome this warning will not be shown - see this ticket: https://code.google.com/p/chromium/issues/detail?id=248712 – Anentropic Aug 28 '13 at 10:22
  • interesting to note: it appears the `font/woff` mime type that Chrome is complaining about will in future be the *correct* mime type – Anentropic Aug 29 '13 at 11:01