Skip to content

Commit

Permalink
fixed content type of the jsreverse script
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Mc Sween committed Aug 29, 2014
1 parent 6a08ecb commit c89dc4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion django_js_reverse/tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ def test_namespaces(self):
self.assertContains(response, "'ns2:test_two_url_args', "
"['ns2/test_two_url_args/%(arg_one)s\\u002D%(arg_two)s/', ['arg_one','arg_two']]")

def test_content_type(self):
response = self.client.post('/jsreverse/')
self.assertEqual(response['Content-Type'], 'application/javascript')


if __name__ == '__main__':
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..') + os.sep)
unittest.main()
unittest.main()
2 changes: 1 addition & 1 deletion django_js_reverse/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def urls_js(request):

view_kwargs = {
'context_instance': RequestContext(request),
content_type_keyword_name: content_type_keyword_name
content_type_keyword_name: 'application/javascript'
}

return render_to_response('django_js_reverse/urls_js.tpl',
Expand Down

0 comments on commit c89dc4e

Please sign in to comment.