36 lines
954 B
Python
36 lines
954 B
Python
from flask import Flask
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
from app.config import Config
|
|
|
|
db = SQLAlchemy()
|
|
|
|
def create_app():
|
|
app = Flask(__name__)
|
|
app.config.from_object(Config)
|
|
|
|
db.init_app(app)
|
|
|
|
# Register Blueprints
|
|
# from app.routes.user import user_bp
|
|
from app.routes.subcontractor_routes import subcontractor_bp
|
|
from app.routes.dashboard import dashboard_bp
|
|
from app.routes.file_import import file_import_bp
|
|
from app.routes.file_report import file_report_bp
|
|
from app.routes.generate_comparison_report import generate_report_bp
|
|
|
|
from app.routes.file_format import file_format
|
|
|
|
# app.register_blueprint(user_bp)
|
|
app.register_blueprint(subcontractor_bp)
|
|
app.register_blueprint(dashboard_bp)
|
|
app.register_blueprint(file_import_bp)
|
|
app.register_blueprint(file_report_bp)
|
|
app.register_blueprint(generate_report_bp)
|
|
|
|
app.register_blueprint(file_format)
|
|
|
|
|
|
return app
|
|
|
|
|