﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3526	HttpResponse object should have 'content_type' argument (in additon to / instead of 'mimetype')	Simon Willison	Adrian Holovaty	"I can never remember the 'mimetype' argument to HttpResponse; I always have to look it up. The corresponding HTTP header is 'Content-Type'; I think that content_type would be a more memorable and more accurate argument.

For example:

{{{
return HttpResponse(simplejson.dumps({
    'airports': airports
}), mimetype='application/json; charset=utf-8')
}}}

Should be:

{{{
return HttpResponse(simplejson.dumps({
    'airports': airports
}), content_type='application/json; charset=utf-8')
}}}

The charset=utf-8 bit further demonstrates that mimetype should be renamed - charset=utf-8 is a parameter, not part of the actual mime media type.

I suggest adding content_type as an alternative to mimetype; I see no particular need to deprecate mimetype and break existing code, although it may be something that should be removed in the future."		closed	Core (Other)	dev		fixed	httpresponse		Ready for checkin	1	1	0	0	0	0
