#!/usr/bin/env python
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_bcrypt import Bcrypt
from flask_login import LoginManager
from flask_mail import Mail

app = Flask(__name__)
app.config['SECRET_KEY']='4df0ad67cbc5f93fdf9abea8938a082b'
app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///site.db'
db = SQLAlchemy(app)
bcrypt = Bcrypt(app)
login_manager= LoginManager(app)
login_manager.login_view = 'users.login'
login_manager.login_message_category = 'info'
app.config["MAIL_SERVER"]='smtp.googlemail.com'
app.config["MAIL_PORT"]=587
app.config["MAIL_USE_TLS"]=True
app.config["MAIL_USERNAME"]='sauravgupta2800@gmail.com'
app.config["MAIL_PASSWORD"]='Shivansh11602832@10'

mail = Mail(app)

from app.users.routes import users;
from app.posts.routes import posts;
from app.main.routes import main;

app.register_blueprint(users)
app.register_blueprint(posts)
app.register_blueprint(main)