Skip to content

Commit

Permalink
Never cache hack.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jpic committed Mar 22, 2012
1 parent ec44477 commit 26bc18b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion admin_hack/views.py
Expand Up @@ -72,8 +72,11 @@ class JsHackView(generic.TemplateView):
template_name = 'admin_hack/hack.js'

def render_to_response(self, context):
return super(JsHackView, self).render_to_response(context,
response = super(JsHackView, self).render_to_response(context,
content_type='text/javascript')
response['Cache-Control'] = 'no-cache'
response['Pragma'] = 'no-cache'
return response

def get_context_data(self, **kwargs):
c = kwargs
Expand Down

0 comments on commit 26bc18b

Please sign in to comment.