Example #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,
     }
Example #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,
     )
Example #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,
     )
Example #4
0
 def get_html_attrs(self):
     return convert_dictionary_to_html_attributes(self.attrs)
Example #5
0
 def get_html_attrs(self):
     return convert_dictionary_to_html_attributes(self.attrs)