示例#1
0
    def __init__(self, config):
        matplotlib.use('Agg')
        RESTFormatter.__init__(self, config)

        self.supporttypes = {'image/png': self.png,
                             '*/*': self.png,
                             'application/pdf': self.pdf,
                             'image/svg+xml':self.svg}
示例#2
0
 def __init__(self, config):
     "Initialise the formatter and set the mime types it supports"
     RESTFormatter.__init__(self, config)
     mimes = {
         'text/json+das': self.dasjson,
         'application/xml+das': self.xml,
         'application/plist': self.plist
     }
     self.supporttypes.update(mimes)
 def __init__(self, config):
     RESTFormatter.__init__(self, config)
     self.supporttypes = {'application/xml': self.xml,
                          'application/atom+xml': self.atom,
                          'text/json': self.json,
                          'text/x-json': self.json,
                          'application/json': self.json,
                          'text/html': self.to_string,
                          'text/plain': self.to_string,
                          '*/*': self.json}
示例#4
0
    def __init__(self, config):
	RESTFormatter.__init__(self, config)
        self.supporttypes = {'application/xml': self.xml,
                   'application/atom+xml': self.atom,
                   'text/json': self.json,
                   'text/x-json': self.json,
                   'application/json': self.json,
                   'text/html': self.to_string,
                   'text/plain': self.to_string,
                   '*/*': self.json}
示例#5
0
    def __init__(self, config):
        matplotlib.use('Agg')
        RESTFormatter.__init__(self, config)

        self.supporttypes = {
            'image/png': self.png,
            '*/*': self.png,
            'application/pdf': self.pdf,
            'image/svg+xml': self.svg
        }
示例#6
0
 def __init__(self, config):
     "Initialise the formatter and set the mime types it supports"
     RESTFormatter.__init__(self, config)
     mimes = {'text/json+das':self.dasjson, 'application/xml+das':self.xml,
              'application/plist':self.plist}
     self.supporttypes.update(mimes)