~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to turbozpt/template.py

on the way to revision.pt: a probably better way of doing template reuse

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        pagetemplatefile.PageTemplateFile.__init__(self, self.fullpath)
28
28
    
29
29
    def render(self, extra_dict=None):
30
 
        if extra_dict:
31
 
            context = self.pt_getContext()
32
 
            context.update(extra_dict)
 
30
        if extra_dict is None:
 
31
            extra_dict = {}
 
32
        context = self.pt_getContext()
 
33
        context.update(extra_dict)
33
34
        return self.pt_render(context)
34
35
    
35
36
    def add_context(self, d):