Django

Code

Changeset 3920

Show
Ignore:
Timestamp:
10/24/06 11:23:05 (2 years ago)
Author:
adrian
Message:

Made small edits to docs/templates_python.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/templates_python.txt

    r3911 r3920  
    313313 
    314314Note:: 
    315     If you are using Django's ``render_to_response()`` shortcut to populate a 
     315    If you're using Django's ``render_to_response()`` shortcut to populate a 
    316316    template with the contents of a dictionary, your template will be passed a 
    317     ``Context`` instance by default (not a ``RequestContext``). If you wish to 
    318     use a ``RequestContext`` in your template rendering, you need to pass an 
    319     optional third argument 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`` 
    320320    instance. Your code might look like this:: 
    321321 
     
    324324            return render_to_response('my_template'html', 
    325325                                      my_data_dictionary, 
    326                                       context_instance = RequestContext(request)) 
     326                                      context_instance=RequestContext(request)) 
    327327 
    328328Here's what each of the default processors does: 
     
    10931093 
    10941094    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 the 
     1095    system as an output component in another application. If you're using the 
    10961096    template system as part of a Django application, nothing here applies to 
    10971097    you. 
     
    11101110templating functions, call ``django.conf.settings.configure()`` with any 
    11111111settings 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), 
    11131113``DEFAULT_CHARSET`` (although the default of ``utf-8`` is probably fine) and 
    11141114``TEMPLATE_DEBUG``. All available settings are described in the