コード例 #1
0
ファイル: __init__.py プロジェクト: nkhs89/lunchbuddys
def initialize_app():

    instance_path = os.path.abspath(os.path.dirname(__file__) + '/../..')
    template_folder = os.path.join(instance_path, 'app/views')
    static_folder = os.path.join(instance_path, 'app/static')
    app = Flask('app', static_folder=static_folder, template_folder=template_folder, instance_path=instance_path)

    initialize_config(app)
    initialize_db(app)
    initialize_routes(app)

    return app
コード例 #2
0
ファイル: __init__.py プロジェクト: kgroenke/idea_board
def initialize_app():
    instance_path = os.path.abspath(os.path.dirname(__file__) + "/../..")
    template_folder = os.path.join(instance_path, "app/views")
    static_folder = os.path.join(instance_path, "app/static")

    app = Flask("app", static_folder=static_folder, template_folder=template_folder, instance_path=instance_path)

    initialize_config(app)
    initialize_db(app)
    initialize_routes(app)

    return app
コード例 #3
0
ファイル: __init__.py プロジェクト: slsteven/Pylot
def initialize_app():
    instance_path = os.path.abspath(os.path.dirname(__file__) + '/../..')
    template_folder = os.path.join(instance_path, 'app/views')
    static_folder = os.path.join(instance_path, 'app/static')

    app = Flask('app', static_folder=static_folder, template_folder=template_folder, instance_path=instance_path)

    initialize_config(app)
    initialize_db(app)

    # TODO: Move Routes into specific initialize routes file
    routes.initialize_routes(app)

    return app
コード例 #4
0
from system.init import app
from system import socketio
import subprocess

from system.init.configuration import initialize_config
from system.init.database import initialize_db
from system.init.routes import initialize_routes

initialize_config(app)
initialize_db(app)
initialize_routes(app)

if __name__ == "__main__":
    socketio.run(app)