Ejemplo n.º 1
0
def load_all_routes(server):
    if run_with_source():
        load_all_routes_dev(root_path() + '/src/' + server.lower() + '/', 'handler')
    else:
        zfile = zipfile.PyZipFile(sys.argv[0], mode='r', compression = zipfile.ZIP_DEFLATED)
        load_all_routes_production(zfile, 'handler')
        zfile = None
Ejemplo n.º 2
0
#-*-coding: utf-8-*-

# Version: 0.1
# Author: Don Li <*****@*****.**>
# License: Copyright(c) 2015 Don.Li
# Summary:

from config_parser import config
from osutil        import root_path

URL_ROOT = 'http://{0}:{1}'.format(
        config.get('DASHBOARD', 'hostname'),
        config.get('DASHBOARD', 'port').split(':')[1]
    )

ROOT_PATH = root_path()
STATIC_PATH   = ROOT_PATH + config.get('DASHBOARD', 'static_path')
TEMPLATE_PATH = ROOT_PATH + config.get('DASHBOARD', 'template_path')