Example #1
0
    def __init__(self, name):
        Debuggable.__init__(self)
        self.name = name

        #: The name of the module as used by get_additional_data().
        #: the name of the file with .py stripped off.
        self._module_name = MODULE_RE.search(self.name).group('module')

        #: The attributes exported by this module
        self._attrs = []

        #: The attributes added to the template namespace by this module
        self.defaults = []

        default_prov = DefaultTemplateDataProvider()
        self.reserved_defaults = default_prov.get_template_data(
            lxml.etree.Element("Path", name="/dummy"),
            None, None).keys() + ["path"]
Example #2
0
    def __init__(self, name, core):
        Debuggable.__init__(self)
        self.name = name
        self.core = core

        #: The name of the module as used by get_additional_data().
        #: the name of the file with .py stripped off.
        self._module_name = MODULE_RE.search(self.name).group('module')

        #: The attributes exported by this module
        self._attrs = []

        #: The attributes added to the template namespace by this module
        self.defaults = []

        default_prov = DefaultTemplateDataProvider()
        self.reserved_defaults = default_prov.get_template_data(
            lxml.etree.Element("Path", name="/dummy"),
            None, None).keys() + ["path"]
Example #3
0
 def get_template_data(self, entry, metadata, template):
     rv = DefaultTemplateDataProvider.get_template_data(self, entry,
                                                        metadata, template)
     rv['path'] = rv['name']
     return rv
Example #4
0
 def get_template_data(self, entry, metadata, template):
     rv = DefaultTemplateDataProvider.get_template_data(
         self, entry, metadata, template)
     rv['path'] = template
     return rv
 def get_template_data(self, entry, metadata, template):
     rv = DefaultTemplateDataProvider.get_template_data(self, entry, metadata, template)
     rv["path"] = rv["name"]
     return rv