示例#1
0
 def make_element(self, tag, contents='', attrs=None):
     if attrs:
         attrs = convert_dictionary_to_html_attributes(attrs)
         template = '<%(tag)s %(attrs)s>%(contents)s</%(tag)s>'
     else:
         template = '<%(tag)s>%(contents)s</%(tag)s>'
     return template % {
         'tag': tag,
         'attrs': attrs,
         'contents': contents,
     }
示例#2
0
 def make_element(self, tag, contents='', attrs=None):
     if attrs:
         attrs = convert_dictionary_to_html_attributes(attrs)
         template = '<{tag} {attrs}>{contents}</{tag}>'
     else:
         template = '<{tag}>{contents}</{tag}>'
     return template.format(
         tag=tag,
         attrs=attrs,
         contents=contents,
     )
示例#3
0
 def make_element(self, tag, contents='', attrs=None):
     if attrs:
         attrs = convert_dictionary_to_html_attributes(attrs)
         template = '<{tag} {attrs}>{contents}</{tag}>'
     else:
         template = '<{tag}>{contents}</{tag}>'
     return template.format(
         tag=tag,
         attrs=attrs,
         contents=contents,
     )
示例#4
0
 def get_html_attrs(self):
     return convert_dictionary_to_html_attributes(self.attrs)
示例#5
0
 def get_html_attrs(self):
     return convert_dictionary_to_html_attributes(self.attrs)