from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_mail import Mail

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

db = SQLAlchemy(app)
migrate = Migrate(app, db)

# Load Flask-Mail
mail = Mail(app)



from app import views, models

from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_mail import Mail
from flask_user import UserManager, SQLAlchemyAdapter

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

db = SQLAlchemy(app)
migrate = Migrate(app, db)

# Load Flask-Mail
mail = Mail(app)

# Configure user model for Flask-User
from app.models import User

db_adapter = SQLAlchemyAdapter(db, User)
user_manager = UserManager(db_adapter, app)


from app import views, models

Set up Flask-User to provide user auth
Set up Flask-User to provide user auth

  from flask import Flask
  from flask_sqlalchemy import SQLAlchemy
  from flask_migrate import Migrate
  from flask_mail import Mail
+ from flask_user import UserManager, SQLAlchemyAdapter
  
  app = Flask(__name__)
  app.config.from_object('config')
  
  db = SQLAlchemy(app)
  migrate = Migrate(app, db)
  
  # Load Flask-Mail
  mail = Mail(app)
  
+ # Configure user model for Flask-User
+ from app.models import User
+ 
+ db_adapter = SQLAlchemyAdapter(db, User)
+ user_manager = UserManager(db_adapter, app)
  
  
  from app import views, models
  
Set up Flask-User to provide user auth
## Code Before:
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_mail import Mail

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

db = SQLAlchemy(app)
migrate = Migrate(app, db)

# Load Flask-Mail
mail = Mail(app)



from app import views, models

## Instruction:
Set up Flask-User to provide user auth
## Code After:
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_mail import Mail
from flask_user import UserManager, SQLAlchemyAdapter

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

db = SQLAlchemy(app)
migrate = Migrate(app, db)

# Load Flask-Mail
mail = Mail(app)

# Configure user model for Flask-User
from app.models import User

db_adapter = SQLAlchemyAdapter(db, User)
user_manager = UserManager(db_adapter, app)


from app import views, models
