def get_runtime_data(key, value=None): v = runtime_data.get(key) if v: return v db = global_dbsession() v = SiteConfig.get(db, key, None) if v: runtime_data[key] = v return v return value
def get_site_config(key, default_value=None): db = global_dbsession() v = SiteConfig.get(db, key, default_value) return v
def db(self): return global_dbsession()