diff options
| author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2013-05-19 01:37:25 -0700 |
|---|---|---|
| committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2013-05-19 01:37:25 -0700 |
| commit | 33c361ef9d882522aeae549a3a8c8b52ca5cfc5a (patch) | |
| tree | 7c07f1f460ea123af7d9aa29ac6de254b423f9cc /docs/ref/template-response.txt | |
| parent | c70ca4879ee33fc4b70ad9a17d74b649f8f75487 (diff) | |
| parent | a4a761ada2286e0f08282efe8dffcd1b384c052c (diff) | |
Merge pull request #1129 from frog32/master
Add needed Imports to the Documentation
Diffstat (limited to 'docs/ref/template-response.txt')
| -rw-r--r-- | docs/ref/template-response.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt index cdefe2fae8..4f34d150ed 100644 --- a/docs/ref/template-response.txt +++ b/docs/ref/template-response.txt @@ -215,6 +215,7 @@ re-rendered, you can re-evaluate the rendered content, and assign the content of the response manually:: # Set up a rendered TemplateResponse + >>> from django.template.response import TemplateResponse >>> t = TemplateResponse(request, 'original.html', {}) >>> t.render() >>> print(t.content) @@ -256,6 +257,8 @@ To define a post-render callback, just define a function that takes a single argument -- response -- and register that function with the template response:: + from django.template.response import TemplateResponse + def my_render_callback(response): # Do content-sensitive processing do_post_processing() |
