def load_config(config_file): """Loads the config file. The loaded config will be available via infogami.config. """ infogami.load_config(config_file) setup_infobase_config(config_file) # This sets web.config.db_parameters server.update_config(config.infobase)
def _update_infobase_config(): """Updates infobase config when this function is called for the first time. From next time onwards, it doens't do anything becase this function is memoized. """ # update infobase configuration from infogami.infobase import server if not config.get("infobase"): config.infobase = {} # This sets web.config.db_parameters server.update_config(config.infobase)
def load_config(config_file): """Loads the config file. The loaded config will be available via infogami.config. """ if 'pytest' in sys.modules: # During pytest ensure we're not using like olsystem or something assert config_file == 'conf/openlibrary.yml' infogami.load_config(config_file) setup_infobase_config(config_file) # This sets web.config.db_parameters server.update_config(config.infobase)