Django

Code

Changeset 3865

Show
Ignore:
Timestamp:
09/26/06 10:38:44 (2 years ago)
Author:
adrian
Message:

Fixed #2744 -- Added 'Writing your own context processors' to docs/templates_python.txt

Files:

Legend:

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

    r3772 r3865  
    367367you'll have to activate it. 
    368368 
     369Writing your own context processors 
     370~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     371 
     372A context processor has a very simple interface: It's just a Python function 
     373that takes one argument, an ``HttpRequest`` object, and returns a dictionary 
     374that gets added to the template context. Each context processor *must* return 
     375a dictionary. 
     376 
     377Custom context processors can live anywhere in your code base. All Django cares 
     378about is that your custom context processors are pointed-to by your 
     379``TEMPLATE_CONTEXT_PROCESSORS`` setting. 
     380 
    369381Loading templates 
    370382-----------------