From a0bd24f2f05f794933850ed45c6fc480c3efa084 Mon Sep 17 00:00:00 2001
From: Jim Garrison <garrison@wikiotics.org>
Date: Sat, 27 Oct 2012 19:09:56 -0700
Subject: [PATCH] make render_to_response() docs refer to content_type, not
mimetype
---
docs/topics/http/shortcuts.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt
index 0dc38b1..c8f2c69 100644
a
|
b
|
This example is equivalent to::
|
87 | 87 | ``render_to_response`` |
88 | 88 | ====================== |
89 | 89 | |
90 | | .. function:: render_to_response(template_name[, dictionary][, context_instance][, mimetype]) |
| 90 | .. function:: render_to_response(template_name[, dictionary][, context_instance][, content_type]) |
91 | 91 | |
92 | 92 | Renders a given template with a given context dictionary and returns an |
93 | 93 | :class:`~django.http.HttpResponse` object with that rendered text. |
… |
… |
Optional arguments
|
121 | 121 | my_data_dictionary, |
122 | 122 | context_instance=RequestContext(request)) |
123 | 123 | |
124 | | ``mimetype`` |
| 124 | ``content_type`` |
125 | 125 | The MIME type to use for the resulting document. Defaults to the value of |
126 | 126 | the :setting:`DEFAULT_CONTENT_TYPE` setting. |
127 | 127 | |
… |
… |
MIME type :mimetype:`application/xhtml+xml`::
|
136 | 136 | def my_view(request): |
137 | 137 | # View code here... |
138 | 138 | return render_to_response('myapp/index.html', {"foo": "bar"}, |
139 | | mimetype="application/xhtml+xml") |
| 139 | content_type="application/xhtml+xml") |
140 | 140 | |
141 | 141 | This example is equivalent to:: |
142 | 142 | |
… |
… |
This example is equivalent to::
|
148 | 148 | t = loader.get_template('myapp/template.html') |
149 | 149 | c = Context({'foo': 'bar'}) |
150 | 150 | return HttpResponse(t.render(c), |
151 | | mimetype="application/xhtml+xml") |
| 151 | content_type="application/xhtml+xml") |
152 | 152 | |
153 | 153 | ``redirect`` |
154 | 154 | ============ |