Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #2744 -- Added 'Writing your own context processors' to docs/te…


git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 2170110 commit 5e218888225950b5fa5dcdb6acc634cbf6e09d10 @adrianholovaty adrianholovaty committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 docs/templates_python.txt
12 docs/templates_python.txt
@@ -366,6 +366,18 @@ If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every
`HttpRequest object`_. Note that this processor is not enabled by default;
you'll have to activate it.
+Writing your own context processors
+A context processor has a very simple interface: It's just a Python function
+that takes one argument, an ``HttpRequest`` object, and returns a dictionary
+that gets added to the template context. Each context processor *must* return
+a dictionary.
+Custom context processors can live anywhere in your code base. All Django cares
+about is that your custom context processors are pointed-to by your
Loading templates

0 comments on commit 5e21888

Please sign in to comment.
Something went wrong with that request. Please try again.