Exemplo n.º 1
0
import os
import site
site.addsitedir(os.path.join(os.path.dirname(__file__), 'lib'))
from py4web.core import Reloader, bottle
os.environ['PY4WEB_DASHBOARD_MODE'] = 'demo'
os.environ['PY4WEB_SERVICE_DB_URI'] = 'sqlite:memory'
os.environ['PY4WEB_APPS_FOLDER'] = os.path.join(os.path.dirname(__file__),
                                                'apps')
os.environ['PY4WEB_SERVICE_FOLDER'] = os.path.join(os.path.dirname(__file__),
                                                   'apps/.service')
Reloader.import_apps()
app = bottle.default_app()
Exemplo n.º 2
0
 def reload(name=None):
     """Reloads installed apps"""
     Reloader.import_app(name) if name else Reloader.import_apps()
     return "ok"
Exemplo n.º 3
0
def reload(name = None):
    """reloads installed apps"""
    Reloader.import_app(name) if name else Reloader.import_apps()
    return dict(flash = 'Done!')
Exemplo n.º 4
0
 def reload():
     """Reloads installed apps"""
     Reloader.import_apps()
     return 'ok'
Exemplo n.º 5
0
def reload():
    """reloads installed apps"""
    Reloader.import_apps()
    return dict(flash='Done!')