コード例 #1
0
    def output(self, handler):
        if self.__double_quotes:
            handler('"')

        Token.output(self, handler)

        if self.__double_quotes:
            handler('"')
コード例 #2
0
 def output(self, handler):
     # Blocktrans output
     handler(u"{%blocktrans ")
     for p in self.params:
         p.output(handler)
         handler(u" ")
     handler(u"%}")
     Token.output(self, handler)
     handler(u"{%endblocktrans%}")
 def output(self, handler):
     # Blocktrans output
     handler(u'{%blocktrans ');
     for p in self.params:
         p.output(handler)
         handler(u' ')
     handler(u'%}')
     Token.output(self, handler)
     handler(u'{%endblocktrans%}')
コード例 #4
0
    def output(self, handler):
        # Yield this node's content, or if the variable name
        # has been changed, use the modified name.
        if self.__varname:
            handler(self.__varname)

        elif self.__link_to:
            self.__link_to.output(handler)

        else:
            Token.output(self, handler)
コード例 #5
0
    def output(self, handler):
        handler("<script ")
        handler(u" ".join([u"%s%s" % (a, self.__attrs[a]) for a in self.__attrs.keys()]))
        handler(">")

        if not self.is_external:
            handler("//<![CDATA[\n")

        Token.output(self, handler)

        if not self.is_external:
            handler(u"//]]>\n")

        handler(u"</script>")
コード例 #6
0
    def output(self, handler):
        handler('<script ')
        handler(u' '.join([ u'%s%s' % (a, self.__attrs[a]) for a in self.__attrs.keys() ]))
        handler('>')

        if not self.is_external:
            handler('//<![CDATA[\n')

        Token.output(self, handler)

        if not self.is_external:
            handler(u'//]]>\n')

        handler(u'</script>')
 def output(self, handler):
     handler(u'{%macro "'); handler(self.macro_name); handler(u'"%}')
     Token.output(self, handler)
     handler(u'{%endmacro%}')
コード例 #8
0
 def output(self, handler):
     handler(u'(')
     Token.output(self, handler)
     handler(u')')
コード例 #9
0
 def output(self, handler):
     handler("</")
     Token.output(self, handler)
     handler(">")
コード例 #10
0
 def output(self, handler):
     if self.__show_cdata_signs:
         handler("<![CDATA[")
     Token.output(self, handler)
     if self.__show_cdata_signs:
         handler("]]>")
コード例 #11
0
 def output(self, handler):
     if self.__show_comment_signs:
         handler("<!--")
     Token.output(self, handler)
     if self.__show_comment_signs:
         handler("-->")
コード例 #12
0
 def output(self, handler):
     handler(u'{')
     Token.output(self, handler)
     handler(u'}')
コード例 #13
0
 def output(self, handler):
     # Don't output the template tags.
     # (these are hints to the preprocessor only.)
     Token.output(self, handler)
コード例 #14
0
 def output(self, handler):
     handler(u'[')
     Token.output(self, handler)
     handler(u']')
コード例 #15
0
 def output(self, handler):
     self.__open_tag.output(handler)
     Token.output(self, handler)
     handler("</textarea>")
コード例 #16
0
 def output(self, handler):
     handler(u'<style type="text/css"><!--')
     Token.output(self, handler)
     handler(u"--></style>")
コード例 #17
0
 def output(self, handler):
     handler(self._open_tag)
     Token.output(self, handler)
     handler(self._end_tag)
コード例 #18
0
 def output(self, handler):
     handler('</')
     Token.output(self, handler)
     handler('>')
コード例 #19
0
 def output(self, handler):
     if self.__show_cdata_signs: handler('<![CDATA[')
     Token.output(self, handler)
     if self.__show_cdata_signs: handler(']]>')
コード例 #20
0
 def output(self, handler):
     if self.__show_comment_signs: handler('<!--')
     Token.output(self, handler)
     if self.__show_comment_signs: handler('-->')
コード例 #21
0
 def output(self, handler):
     self.__open_tag.output(handler)
     Token.output(self, handler)
     handler("</pre>")
 def output(self, handler):
     # Don't output the template tags.
     # (these are hints to the preprocessor only.)
     Token.output(self, handler)
コード例 #23
0
 def output(self, handler):
     self.__open_tag.output(handler)
     Token.output(self, handler)
     handler("</%s>" % name)
 def output(self, handler):
     handler(u'{%block '); handler(self.block_name); handler(u'%}')
     Token.output(self, handler)
     handler(u'{%endblock%}')
コード例 #25
0
 def output(self, handler):
     handler(u'{%macro "')
     handler(self.macro_name)
     handler(u'"%}')
     Token.output(self, handler)
     handler(u"{%endmacro%}")
コード例 #26
0
 def output(self, handler):
     handler(self.__start)
     Token.output(self, handler)
     handler(u"<![endif]-->")
コード例 #27
0
 def output(self, handler):
     handler(u"{%block ")
     handler(self.block_name)
     handler(u"%}")
     Token.output(self, handler)
     handler(u"{%endblock%}")
コード例 #28
0
 def output(self, handler):
     handler(u'{%ifdebug%}')
     Token.output(self, handler)
     handler(u'{%endifdebug%}')