Ticket #13841: 13841-docs.diff
File 13841-docs.diff, 1.1 KB (added by , 14 years ago) |
---|
-
ref/templates/api.txt
516 516 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 517 517 518 518 A context processor has a very simple interface: It's just a Python function 519 that takes one argument, an :class:`~django.http.HttpRequest` object, and 520 returns a dictionary that gets added to the template context. Each context 521 processor *must* return a dictionary. 519 that takes at least one argument, an :class:`~django.http.HttpRequest` object. 522 520 521 .. versionadded:: 1.2 522 The optional keyword argument ``context`` is now supported, which allows 523 access to the current :class:`~django.template.Context` object. 524 525 The function returns a dictionary that gets added to the template context. 526 Each context processor *must* return a dictionary. 527 523 528 Custom context processors can live anywhere in your code base. All Django cares 524 529 about is that your custom context processors are pointed-to by your 525 530 :setting:`TEMPLATE_CONTEXT_PROCESSORS` setting.