From 89cb771be7b53c40642872cdbedb15943bdf8e34 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Thu, 31 Jan 2013 13:39:29 +0100 Subject: Fixed #19692 -- Completed deprecation of mimetype in favor of content_type. Thanks Tim for the report and initial patch. --- docs/topics/http/shortcuts.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'docs/topics') diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt index b1b4700b73..68860f123f 100644 --- a/docs/topics/http/shortcuts.txt +++ b/docs/topics/http/shortcuts.txt @@ -50,6 +50,9 @@ Optional arguments The MIME type to use for the resulting document. Defaults to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting. + .. versionchanged:: 1.5 + This parameter used to be called ``mimetype``. + ``status`` The status code for the response. Defaults to ``200``. @@ -87,7 +90,7 @@ This example is equivalent to:: ``render_to_response`` ====================== -.. function:: render_to_response(template_name[, dictionary][, context_instance][, mimetype]) +.. function:: render_to_response(template_name[, dictionary][, context_instance][, content_type]) Renders a given template with a given context dictionary and returns an :class:`~django.http.HttpResponse` object with that rendered text. @@ -121,10 +124,14 @@ Optional arguments my_data_dictionary, context_instance=RequestContext(request)) -``mimetype`` +``content_type`` The MIME type to use for the resulting document. Defaults to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting. + .. versionchanged:: 1.5 + This parameter used to be called ``mimetype``. + + Example ------- @@ -148,7 +155,7 @@ This example is equivalent to:: t = loader.get_template('myapp/template.html') c = Context({'foo': 'bar'}) return HttpResponse(t.render(c), - mimetype="application/xhtml+xml") + content_type="application/xhtml+xml") ``redirect`` ============ -- cgit v1.3