from flask import abort, Flask, g, request, session from flaskext.markdown import Markdown from functools import wraps from olegsessions import OlegDBSessionInterface from olegdb import OlegDB from metaforcefeed.routes import app as routes from metaforcefeed.utils import random_csrf, auth_user, enable_admin from metaforcefeed.conprocs import app as conprocs from metaforcefeed.filters import unix_to_human import sys, getopt, random, string, json, time app = Flask("metaforcefeed") app.register_blueprint(routes) app.register_blueprint(conprocs) app.config["CACHE"] = True app.session_interface = OlegDBSessionInterface() app.jinja_env.filters["unix_to_human"] = unix_to_human Markdown(app) def profile_wrapper(to_profile): all_funcs = { x: getattr(to_profile, x) for x in dir(to_profile) if str(type(getattr(to_profile, x))) == "<type 'instancemethod'>" and not x.startswith("__") } calls_dict = {} def delta_wrapper(to_profile, old_function):
from flask import Flask import os import sys, logging app = Flask(__name__) # app.config['SQL_CONNECTSTRING'] = r'Driver={SQL Server};Server=.\SQLEXPRESS;Database=ouc_hotel;Trusted_Connection=yes;' app.config[ "SQL_CONNECTSTRING" ] = r"Driver={SQL Server Native Client 11.0};Server=(localdb)\v11.0;Database=ouc_restaurant;Trusted_Connection=yes;" app.config["UPLOAD_FOLDER"] = os.path.join(sys.path[0], "upload") try: os.mkdir(os.path.join(app.config["UPLOAD_FOLDER"])) except StandardError, e: pass app.config["DISH_STATE"] = {"init": 0, "doing": 1, "done": 2, "finish": 3, "cancel": 4} app.config["CACHE"] = {} app.secret_key = "12345678" import manage import Reception import Waiter import Cooker