def __initTags():
    from AE.Cache import tagRegistry
    import ArgsTag
    tagRegistry.addTag(ArgsTag.ArgsTag())
    import LogTags
    for i in LogTags.LoggingTags:
        tagRegistry.addTag(i)
    import SendmailTag
    tagRegistry.addTag(SendmailTag.SendmailTag())
    import HTMLTags
    for i in ['UrlTag', 'ImageTag', 'FormTag', 'HiddenTag', 'RedirectTag']:
        tagRegistry.addTag(getattr(HTMLTags, i)())
    import SafeSpoolTag
    tagRegistry.removeTag('spool')
    tagRegistry.addTag(SafeSpoolTag.SafeSpoolTag())
Example #2
0
def __initTags():
    from AE.Cache import tagRegistry
    import ArgsTag
    tagRegistry.addTag(ArgsTag.ArgsTag())
    import LogTags
    for i in LogTags.LoggingTags:
        tagRegistry.addTag(i)
    import SendmailTag
    tagRegistry.addTag(SendmailTag.SendmailTag())
    import HTMLTags
    for i in ['UrlTag', 'ImageTag', 'FormTag', 'HiddenTag', 'RedirectTag']:
        tagRegistry.addTag(getattr(HTMLTags, i)())
    import SafeSpoolTag
    tagRegistry.removeTag('spool')
    tagRegistry.addTag(SafeSpoolTag.SafeSpoolTag())
Example #3
0
        codeout.write(indent, 'try:')
        codeout.write(indent + 4, mapvar)
        codeout.write(indent, "except NameError:")
        codeout.write(indent + 4,
                      "%s=__h.slotutils.getConfiguredSlots()" % mapvar)
        K = getTempName()
        g = getTempName()
        k = '__k4023562'
        codeout.write(indent, "%s=globals()" % g)
        # assigning to k assures that it can be deleted later, as
        # if mapvar is empty, then the loop variable won't be initialized!
        codeout.write(indent, "%s=%s=0" % (k, K))
        codeout.write(indent, "for %s in %s:" % (k, mapvar))
        codeout.write(indent + 4, "%s=%s.upper()" % (K, k))
        codeout.write(indent + 4, "try:")
        codeout.write(indent + 8, "%s[%s]=%s[%s]" % (mapvar, k, g, K))
        codeout.write(indent + 4, "except KeyError:")
        codeout.write(indent + 8, "pass")
        codeout.write(indent, "del %s, %s, %s" % (g, k, K))
        codeout.write(indent, "if %s: " % kw)
        codeout.write(indent + 4, '%s.update(%s)' % (mapvar, kw))
        codeout.write(indent,
                      "__h.OUTPUT.write(__h.computils.include(%s))" % template)
        codeout.write(indent, 'del %s' % template)


tagRegistry.addTag(SlotTag())
tagRegistry.addTag(CallTemplateTag())

__all__ = ('SlotTag', 'CallTemplateTag')
Example #4
0
        codeout.write(indent, 'try:')
        codeout.write(indent+4, mapvar)
        codeout.write(indent, "except NameError:")
        codeout.write(indent+4, "%s=__h.slotutils.getConfiguredSlots()" % mapvar)
        K=getTempName()
        g=getTempName()
        k='__k4023562'
        codeout.write(indent, "%s=globals()" % g)
        # assigning to k assures that it can be deleted later, as
        # if mapvar is empty, then the loop variable won't be initialized!
        codeout.write(indent, "%s=%s=0" % (k,K))
        codeout.write(indent, "for %s in %s:" % (k,mapvar))
        codeout.write(indent+4, "%s=%s.upper()" % (K, k))
        codeout.write(indent+4, "try:")
        codeout.write(indent+8, "%s[%s]=%s[%s]" % (mapvar, k,g,K))
        codeout.write(indent+4, "except KeyError:")
        codeout.write(indent+8, "pass")
        codeout.write(indent, "del %s, %s, %s" % (g, k, K))
        codeout.write(indent, "if %s: " % kw)
        codeout.write(indent+4,
                      '%s.update(%s)' % (mapvar, kw))
        codeout.write(indent, "__h.OUTPUT.write(__h.computils.include(%s))" % template)
        codeout.write(indent, 'del %s' % template)
        

tagRegistry.addTag(SlotTag())
tagRegistry.addTag(CallTemplateTag())

    
__all__=('SlotTag','CallTemplateTag')