swag-shop/app/__init__.py

17 lines
431 B
Python
Raw Normal View History

2024-03-05 16:01:26 +01:00
from flask import Flask
from flask_jwt_extended import JWTManager
app = Flask(__name__)
jwt_manager = JWTManager(app)
2024-03-05 16:01:26 +01:00
def create_app():
2024-03-05 16:01:26 +01:00
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)
return app