comparison markup/plugin.py @ 29:4b6cee37ce62

* Minor simplification of template directives: they no longer get passed the template instance and the position, as no directive was actually using that information. * More docstrings.
author cmlenz
date Wed, 28 Jun 2006 10:40:39 +0000
parents b8456279c444
children 822089ae65ce
comparison
equal deleted inserted replaced
28:15e59a9cb362 29:4b6cee37ce62
10 # 10 #
11 # This software consists of voluntary contributions made by many 11 # This software consists of voluntary contributions made by many
12 # individuals. For the exact contribution history, see the revision 12 # individuals. For the exact contribution history, see the revision
13 # history and logs, available at http://markup.cmlenz.net/log/. 13 # history and logs, available at http://markup.cmlenz.net/log/.
14 14
15 """Basic support for the template engine plugin API used by TurboGears and
16 CherryPy/Buffet.
17 """
18
15 import os 19 import os
16 from pkg_resources import resource_filename 20 from pkg_resources import resource_filename
17 21
18 from markup.template import Context, Template, TemplateLoader 22 from markup.template import Context, Template, TemplateLoader
19 23
20 24
21 class TemplateEnginePlugin(object): 25 class TemplateEnginePlugin(object):
26 """Implementation of the plugin API."""
22 27
23 def __init__(self, extra_vars_func=None, options=None): 28 def __init__(self, extra_vars_func=None, options=None):
24 if options is None: 29 if options is None:
25 options = {} 30 options = {}
26 # TODO get loader_args from the options dict 31 # TODO get loader_args from the options dict
Copyright (C) 2012-2017 Edgewall Software