__commands__ = { "albula":"controller:main" } ### DOREAH CONFIGURATION from doreah import config config( logging={ "logfolder": "logs" }, settings={ "files":[ "settings/default.ini", "settings/settings.ini" ] }, auth={ "multiuser": False, "cookieprefix": "albula" } ) ### USER DATA FOLDER import os import pkg_resources from distutils import dir_util
### DOREAH CONFIGURATION from doreah import config config( settings={ "files":[ data_dir['settings']("default.ini"), data_dir['settings']("settings.ini") ], "environ_prefix":"MALOJA_" }, caching={ "folder": data_dir['cache']() }, auth={ "multiuser":False, "cookieprefix":"maloja", "stylesheets":["/style.css"], "dbfile":data_dir['auth']("auth.ddb") } ) # because we loaded a doreah module already before setting the config, we need to to that manually settingsconfig._readpreconfig() config( logging={ "logfolder": data_dir['logs']() if get_settings("LOGGING") else None
def datadir(*args): return os.path.join(DATA_DIR, *args) ### DOREAH CONFIGURATION from doreah import config config(settings={ "files": [datadir("settings/default.ini"), datadir("settings/settings.ini")], "environ_prefix": "MALOJA_" }, caching={"folder": datadir("cache")}, regular={"autostart": False}, auth={ "multiuser": False, "cookieprefix": "maloja", "stylesheets": ["/style.css"], "dbfile": datadir("auth/auth.ddb") }) # because we loaded a doreah module already before setting the config, we need to to that manually settingsconfig._readpreconfig() config(logging={ "logfolder": datadir("logs") if get_settings("LOGGING") else None })
def datadir(*args): return os.path.join(DATA_DIR, *args) ### DOREAH CONFIGURATION from doreah import config config(pyhp={"version": 2}, logging={"logfolder": datadir("logs")}, settings={ "files": [datadir("settings/default.ini"), datadir("settings/settings.ini")], "environ_prefix": "MALOJA_" }, caching={"folder": datadir("cache")}, regular={"autostart": False}) from doreah.settings import get_settings # thumbor THUMBOR_SERVER, THUMBOR_SECRET = get_settings("THUMBOR_SERVER", "THUMBOR_SECRET") try: USE_THUMBOR = THUMBOR_SERVER is not None and THUMBOR_SECRET is not None if USE_THUMBOR:
"myrcella":"control:main" } ### DOREAH CONFIGURATION from doreah import config import pkg_resources config( packageutils={ "packagename": name, "populate": pkg_resources.resource_filename(__name__,"data_files") } ) from doreah.packageutils import pkgdata, init_datafolder init_datafolder() config( logging={ "logfolder": pkgdata("logs") }, settings={ "files":[ pkgdata("settings","default.ini"), pkgdata("settings","settings.ini") ] } )