Beispiel #1
0
 def load_default_config_from_pyfile(self, filename):
     config = Config(root_path=self.root_path)
     config.from_pyfile(filename)
     for key, default_value in config.items():
         self.config.setdefault(key, default_value)
Beispiel #2
0
 def load_config(self):
     config = Config(current_app.root_path)
     config.from_pyfile(path.join(path.dirname(current_app.root_path),
                                  'config.py'))
     for option, value in config.items():
         setattr(self, option, value)
Beispiel #3
0
 def load_default_config_from_pyfile(self, filename):
     config = Config(root_path=self.root_path)
     config.from_pyfile(filename)
     for key, default_value in config.items():
         self.config.setdefault(key, default_value)