Changeset 3920
- Timestamp:
- 10/24/06 11:23:05 (2 years ago)
- Files:
-
- django/trunk/docs/templates_python.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/templates_python.txt
r3911 r3920 313 313 314 314 Note:: 315 If you are using Django's ``render_to_response()`` shortcut to populate a315 If you're using Django's ``render_to_response()`` shortcut to populate a 316 316 template with the contents of a dictionary, your template will be passed a 317 ``Context`` instance by default (not a ``RequestContext``). If you wish to318 use a ``RequestContext`` in your template rendering, you need to pass an319 optional thirdargument to ``render_to_response()``: a ``RequestContext``317 ``Context`` instance by default (not a ``RequestContext``). To use a 318 ``RequestContext`` in your template rendering, pass an optional third 319 argument to ``render_to_response()``: a ``RequestContext`` 320 320 instance. Your code might look like this:: 321 321 … … 324 324 return render_to_response('my_template'html', 325 325 my_data_dictionary, 326 context_instance =RequestContext(request))326 context_instance=RequestContext(request)) 327 327 328 328 Here's what each of the default processors does: … … 1093 1093 1094 1094 This section is only of interest to people trying to use the template 1095 system as an output component in another application. If you are using the1095 system as an output component in another application. If you're using the 1096 1096 template system as part of a Django application, nothing here applies to 1097 1097 you. … … 1110 1110 templating functions, call ``django.conf.settings.configure()`` with any 1111 1111 settings you wish to specify. You might want to consider setting at least 1112 ``TEMPLATE_DIRS`` (if you are going to use template loaders),1112 ``TEMPLATE_DIRS`` (if you're going to use template loaders), 1113 1113 ``DEFAULT_CHARSET`` (although the default of ``utf-8`` is probably fine) and 1114 1114 ``TEMPLATE_DEBUG``. All available settings are described in the
