~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to turbozpt/template.py

oops, forgot some links
really need to work on link generation, it's a bit ghastly right now

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
        self.base = base
13
13
        self.options = options
14
14
 
15
 
    def __getattribute__(self, name):
16
 
        # import pdb; pdb.set_trace()
17
 
        if name.startswith('_'):
18
 
            return super(Here, self).__getattribute__(name)
19
 
        tpl = PageTemplate(os.path.join(self.__dict__['base'], name))
20
 
        tpl.add_context(object.__getattribute__(self, 'options'))
 
15
    def __getitem__(self, name):
 
16
        tpl = PageTemplate(os.path.join(self.base, name))
 
17
        tpl.add_context(self.options)
21
18
        return tpl
22
19
 
23
20
class PageTemplate(pagetemplatefile.PageTemplateFile):