Changes between Version 2 and Version 4 of Ticket #625


Ignore:
Timestamp:
10/14/2005 09:45:43 AM (10 years ago)
Author:
rjwittams
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #625 – Description

    v2 v4  
    2020}}}
    2121This decorator turns a function returning a dictionary into a template tag that renders another template inline using that dictionary as the context. The decorator takes three arguments :
    22 path - required path to template
    23 context_class - kwarg to override the default context created
    24 takes_context - kwarg boolean. If true, the first argument of the function must be called 'context', and the context of the calling template will be passed into this argument. Useful if it is heavily context dependent and there would be a huge number of arguments.
     22 * path - required path to template
     23 * context_class - kwarg to override the default context created
     24 * takes_context - kwarg boolean. If true, the first argument of the function must be called 'context', and the context of the calling template will be passed into this argument. Useful if it is heavily context dependent and there would be a huge number of arguments.
    2525
    2626The point of not just using the parent context is to make it easy to tell which context variables are used in which templates, ie avoid dynamic scoping hell.
Back to Top