from flask import Flask 
from flask.ext.login import LoginManager 
from flask.ext.sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap 

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

db = SQLAlchemy(app)

lm = LoginManager()
lm.login_view = "login"
lm.init_app(app)

Bootstrap(app)

from app import views, models

from flask import Flask 
from flask.ext.login import LoginManager 
from flask.ext.sqlalchemy import SQLAlchemy

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

db = SQLAlchemy(app)

lm = LoginManager()
lm.login_view = "login"
lm.init_app(app)


from app import views, models

remove dependency from initialization of flask app