from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy import create_engine

app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)

#modifed to False if deploying with wsgi
app.debug = True

engine = create_engine(app.config['WEB_DB_CONFIG'])
Session = scoped_session(sessionmaker(bind=engine))

# assign new function names
# to make debug and error logging easier
debug = app.logger.debug
error = app.logger.error

from api.mod_api.views import mod_api as api_module
from api.mod_onoff.views import mod_onoff as onoff_module
#from api.mod_long.views import mod_long as long_module

app.register_blueprint(api_module)
app.register_blueprint(onoff_module)
#app.register_blueprint(long_module)

Bootstrap(app)

from api import views



from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy import create_engine

app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)

#modifed to False if deploying with wsgi
app.debug = True

engine = create_engine(app.config['WEB_DB_CONFIG'])
Session = scoped_session(sessionmaker(bind=engine))

# assign new function names
# to make debug and error logging easier
debug = app.logger.debug
error = app.logger.error

from api.mod_api.views import mod_api as api_module
from api.mod_onoff.views import mod_onoff as onoff_module
from api.mod_long.views import mod_long as long_module

app.register_blueprint(api_module)
app.register_blueprint(onoff_module)
app.register_blueprint(long_module)

Bootstrap(app)

from api import views



enable long survey