Ticket #14867: template-response.diff

File template-response.diff, 752 bytes (added by Marcus Fredriksson, 14 years ago)
  • docs/ref/template-response.txt

    diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt
    index 4332e6e..3b136b6 100644
    a b change is always applied. If you want to force the content to be  
    189189re-rendered, you can re-evaluate the rendered content, and assign
    190190the content of the response manually::
    191191
    192     # Set up a baked TemplateResponse
     192    # Set up a rendered TemplateResponse
    193193    >>> t = TemplateResponse(request, 'original.html', {})
    194194    >>> t.render()
    195195    >>> print t.content
    196196    Original content
    197197
    198     # Rebaking doesn't change content
     198    # Re-rendering doesn't change content
    199199    >>> t.template_name = 'new.html'
    200200    >>> t.render()
    201201    >>> print t.content
Back to Top