Ticket #6502: 6502.diff
File 6502.diff, 1.3 KB (added by , 17 years ago) |
---|
-
docs/shortcuts.txt
22 22 Optional arguments 23 23 ------------------ 24 24 25 `` context``25 ``dictionary`` 26 26 A dictionary of values to add to the template context. By default, this 27 27 is an empty dictionary. If a value in the dictionary is callable, the 28 28 view will call it just before rendering the template. 29 29 30 ``context_instance`` 31 The context instance to render the template with. By default, the template 32 will be rendered with a ``Context`` instance (filled with values from 33 ``dictionary``). If you need to use `context processors`_, you will want to 34 render the template with a ``RequestContext`` instance instead. Your code 35 might look something like this:: 36 37 return render_to_response('my_template.html', 38 my_data_dictionary, 39 context_instance=RequestContext(request)) 40 30 41 ``mimetype`` 31 42 **New in Django development version:** The MIME type to use for the 32 43 resulting document. Defaults to the value of the ``DEFAULT_CONTENT_TYPE`` 33 44 setting. 34 45 46 .. _`context processors`: ../templates_python/#subclassing-context-requestcontext 47 35 48 Example 36 49 ------- 37 50