0

I have integrated swagger in django project using drf-yasg. Everything works fine on localhost but when deployed on development , swagger-ui css and js are not loading in browser. It gives the following error:

Refused to apply style from '/static/drf-yasg/swagger-ui-dist/swagger-ui.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

I have set following values in settings.py:

STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
holydragon
  • 6,158
  • 6
  • 39
  • 62

0 Answers0