Пример #1
0
 def render():
     ex = get_exporter(key)
     with io.StringIO() as buf:
         self._context.globals['options'][
             'controller'].apply_export_filter(self._target,
                                               ex,
                                               filename=buf)
         res = TypedUnicode(buf.getvalue())
     res.contenttype = ex.mimetype
     return res
Пример #2
0
 def keys(self):
     """Returns the ids of valid exporters
     """
     return list(get_exporter().keys())
Пример #3
0
 def __contains__(self, key):
     v = get_exporter(key)
     return v is not None