diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-01-05 22:41:43 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-01-05 22:41:43 +0000 |
| commit | a3894945b647c3e07acdd35af1104739a93938a2 (patch) | |
| tree | 55f4ca8ef2f69e9d8bbccae6eaa2474e939c86f6 /docs | |
| parent | 093009bf1f37543d4917f495159c4df97b788700 (diff) | |
Fixed #15010 -- Added current_app parameter to close gap between TemplateResponse and render method. Thanks, acdha.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/template-response.txt | 7 | ||||
| -rw-r--r-- | docs/topics/http/shortcuts.txt | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt index 3b136b68b1..d4fe2c4ef2 100644 --- a/docs/ref/template-response.txt +++ b/docs/ref/template-response.txt @@ -129,7 +129,7 @@ TemplateResponse objects Methods ------- -.. method:: TemplateResponse.__init__(request, template, context=None, mimetype=None, status=None, content_type=None) +.. method:: TemplateResponse.__init__(request, template, context=None, mimetype=None, status=None, content_type=None, current_app=None) Instantiates an ``TemplateResponse`` object with the given template, context, MIME type and HTTP status. @@ -158,6 +158,11 @@ Methods ``content_type`` is used. If neither is given, :setting:`DEFAULT_CONTENT_TYPE` is used. + ``current_app`` + A hint indicating which application contains the current view. See the + :ref:`namespaced URL resolution strategy <topics-http-reversing-url-namespaces>` + for more information. + The rendering process ===================== diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt index 1c1dc9ef0b..9d72521c0f 100644 --- a/docs/topics/http/shortcuts.txt +++ b/docs/topics/http/shortcuts.txt @@ -15,7 +15,7 @@ introduce controlled coupling for convenience's sake. ``render`` ========== -.. function:: render(request, template[, dictionary][, context_instance][, content_type][, status]) +.. function:: render(request, template[, dictionary][, context_instance][, content_type][, status][, current_app]) .. versionadded:: 1.3 @@ -23,7 +23,7 @@ introduce controlled coupling for convenience's sake. :class:`~django.http.HttpResponse` object with that rendered text. :func:`render()` is the same as a call to - :func:`render_to_response()` with a context_instance argument that + :func:`render_to_response()` with a `context_instance` argument that that forces the use of a :class:`RequestContext`. Required arguments @@ -55,6 +55,11 @@ Optional arguments ``status`` The status code for the response. Defaults to ``200``. +``current_app`` + A hint indicating which application contains the current view. See the + :ref:`namespaced URL resolution strategy <topics-http-reversing-url-namespaces>` + for more information. + Example ------- |
