Turn off caching of static files in Django development server

后端 未结 9 2228
灰色年华
灰色年华 2020-11-30 04:52

Is there an easy way to turn off caching of static files in Django\'s development server?

I\'m starting the server with the standard command:

<
9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 05:07

    Assuming you're using django.views.static.serve, it doesn't look like it - but writing your own view that just calls django.views.static.serve, adding the Cache-Control header should be rather easy.

提交回复
热议问题