Пример #1
0
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
Пример #2
0
def get_site_config(key, default_value=None):

    db = global_dbsession()
    v = SiteConfig.get(db, key, default_value)

    return v
Пример #3
0
 def db(self):
     return global_dbsession()
Пример #4
0
 def db(self):
     return global_dbsession()