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:
<
For newer Django, the way middleware classes are written has changed a bit.
Follow all the instructions from @aaronstacy above, but for the middleware class, use this:
class NoCache(object):
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
response = self.get_response(request)
response['Cache-Control'] = 'must-revalidate, no-cache'
return response