예제 #1
0
 def __init__(self,app,args=None):
     self.settings_model = _SettingsModel()
     self.settings = self.settings_model.get_settings()
     if args:
         for key, value in args.__dict__.iteritems():
             if value:
                 self.settings[key] = value
     print "Starting thememapper on http://0.0.0.0:" + self.settings['port']
     HTTPServer(WSGIContainer(app)).listen(self.settings['port'])
     if self.settings['diazo_run'] == 'True':
         try: 
             from thememapper.diazo import server
             print "Starting diazo on http://0.0.0.0:" + self.settings['diazo_port']
             HTTPServer(server.get_application(self.settings)).listen(self.settings['diazo_port'])
         except ImportError: 
             print "You will need to install thememapper.diazo before being able to use this function."
예제 #2
0
 def __init__(self, app, args=None):
     self.settings_model = _SettingsModel()
     self.settings = self.settings_model.get_settings()
     if args:
         for key, value in args.__dict__.iteritems():
             if value:
                 self.settings[key] = value
     print "Starting thememapper on http://0.0.0.0:" + self.settings['port']
     HTTPServer(WSGIContainer(app)).listen(self.settings['port'])
     if self.settings['diazo_run'] == 'True':
         try:
             from thememapper.diazo import server
             print "Starting diazo on http://0.0.0.0:" + self.settings[
                 'diazo_port']
             HTTPServer(server.get_application(self.settings)).listen(
                 self.settings['diazo_port'])
         except ImportError:
             print "You will need to install thememapper.diazo before being able to use this function."
예제 #3
0
 def __init__(self):
     self.settings_model = _SettingsModel()
     self.settings = self.settings_model.get_settings()
예제 #4
0
 def __init__(self):
     self.settings_model = _SettingsModel()
     self.settings = self.settings_model.get_settings()