How to set content type of JavaScript files in Django

后端 未结 4 916
野趣味
野趣味 2021-01-13 07:48

I have a Django application, which requires several JavaScript files.

In Chrome I get the error \"Resource interpreted as Script, but transferred with MIME type text

4条回答
  •  攒了一身酷
    2021-01-13 08:09

    I suspect the problem is not what you think it is. What is probably actually happening is that your JS files are not being served at all: instead, the Django error page is being sent. You need to figure out why.

提交回复
热议问题