Example #1
0
def get_template(tags=[], entities=[], actions=[]):
    namespace = namespace_manager.get_namespace()
    
    tags = tags[:]
    cache_key = tuple(tags)
    while tags:
        name = tags.pop()
        fullname = '%s:%s/%s.html' % (namespace, '/'.join(tags), name)        
        t = CACHE.get(cache_key)
        if Geebaby.is_modified(['templates'] + tags, [name]):
            t = None
        if not t:
            try:
                t = CACHE[cache_key] = jinjaenv.get_template(fullname)
            except TemplateNotFound:
                pass
        if t and not t.filename == "<placeholder>":
            return t
    
    fullname = '%s:default.html' % namespace
    t = CACHE[cache_key] = jinjaenv.get_template(fullname)
    return t
Example #2
0
 def uptodate():
     return not Geebaby.is_modified(tags, entity)