0
votes

I'm receiving this error in the console:

Refused to apply style from 'http://127.0.0.1:8000/faq/owl-carousel/owl.carousel.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

My friend told me to write mimetypes.add_type(“text/css”, “.css”, True) into settings.py but i recieved this message: File "/Users/fiennesharris/anonima_sandbox/anonima/settingsDEV.py", line 14 import mimetypes ^ IndentationError: unexpected indent

I'm using Django so how can I fix this? much appreciated!

1
Have you configured static files correctly? How are you referencing the stylesheet in your template? /faq/owl-carousel/owl.carousel.css looks like it might not be a static url and not handled by the static files handlerIain Shelvington

1 Answers

1
votes

i think you are using a web engine or something like that which abuses all requests otherwise delete all statics and collectstatic again and if didn't get fixed the library that you are using is kinda broken to handle this in the library or any template you should add type="text/css" to the link or style tag that you have in the html file which is linked to the css