swag-shop/app/__init__.py

19 lines
457 B
Python

from flask import Flask
from flask_jwt_extended import JWTManager
app = Flask(__name__)
jwt_manager = JWTManager(app)
def create_app():
from app.api import bp, bp_errors, bp_product, bp_user
app.register_blueprint(bp)
app.register_blueprint(bp_errors)
app.register_blueprint(bp_product)
app.register_blueprint(bp_user)
from app.config import FlaskTesting, FlaskProduction
app.config.from_object(FlaskTesting)
from . import jwt_utils
return app