<filename>flask_auth_app/project/__init__.py
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
#import psycopg2
# init SQLAlchemy so we can use it later in our models
#app.config
#db = None
#def create_app():
app = Flask(__name__)

app.config["SQLALCHEMY_DATABASE_URI"] = "postgresql://jmarlin3:password@localhost:5432/Anime"
app.config['SECRET_KEY'] = 'secret-key-goes-here'
db = SQLAlchemy(app)   


login_manager = LoginManager()
login_manager.login_view = 'auth.login'
login_manager.init_app(app)

from .models import User
#app.config['SECRET_KEY'] = 'secret-key-goes-here'
#db = SQLAlchemy.create_engine("postgresql://jmarlin3:Solotrey1540644@localhost:5432/Anime",{})
#app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql:///tutorial.sql'
#db.init_app(app)

# blueprint for auth routes in our app
from .auth import auth as auth_blueprint
app.register_blueprint(auth_blueprint)

# blueprint for non-auth parts of app
from .main import main as main_blueprint
app.register_blueprint(main_blueprint)

@login_manager.user_loader
def load_user(user_id):
    # since the user_id is just the primary key of our user table, use it in the query for the user
    return User.query.get(int(user_id))


    #return app, db
<filename>flask_auth_app/project/__init__.py
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
#import psycopg2
# init SQLAlchemy so we can use it later in our models
#app.config
#db = None
#def create_app():
app = Flask(__name__)

app.config["SQLALCHEMY_DATABASE_URI"] = "postgresql://jmarlin3:password@localhost:5432/Anime"
app.config['SECRET_KEY'] = 'secret-key-goes-here'
db = SQLAlchemy(app)   


login_manager = LoginManager()
login_manager.login_view = 'auth.login'
login_manager.init_app(app)

from .models import User
#app.config['SECRET_KEY'] = 'secret-key-goes-here'
#db = SQLAlchemy.create_engine("postgresql://jmarlin3:Solotrey1540644@localhost:5432/Anime",{})
#app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql:///tutorial.sql'
#db.init_app(app)

# blueprint for auth routes in our app
from .auth import auth as auth_blueprint
app.register_blueprint(auth_blueprint)

# blueprint for non-auth parts of app
from .main import main as main_blueprint
app.register_blueprint(main_blueprint)

@login_manager.user_loader
def load_user(user_id):
    # since the user_id is just the primary key of our user table, use it in the query for the user
    return User.query.get(int(user_id))


    #return app, db
#import psycopg2 # init SQLAlchemy so we can use it later in our models #app.config #db = None #def create_app(): #app.config['SECRET_KEY'] = 'secret-key-goes-here' #db = SQLAlchemy.create_engine("postgresql://jmarlin3:Solotrey1540644@localhost:5432/Anime",{}) #app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql:///tutorial.sql' #db.init_app(app) # blueprint for auth routes in our app # blueprint for non-auth parts of app # since the user_id is just the primary key of our user table, use it in the query for the user #return app, db