create project and create model and dashboard

This commit is contained in:
2025-12-11 10:16:43 +05:30
parent 2371202ac3
commit 2e62320167
55 changed files with 1072 additions and 0 deletions

47
app/__init__.py Normal file
View File

@@ -0,0 +1,47 @@
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.dashboard import dashboard_bp
from app.routes.file_import import file_import_bp
# from app.routes.user import user_bp
app.register_blueprint(dashboard_bp)
app.register_blueprint(file_import_bp)
# app.register_blueprint(user_bp)
from app.routes.subcontractor_routes import subcontractor_bp
app.register_blueprint(subcontractor_bp)
return app
# from flask import Flask
# from app.config import Config
# def create_app():
# app = Flask(__name__)
# app.config.from_object(Config)
# # Register Blueprints
# from app.routes.dashboard import dashboard_bp
# from app.routes.file_import import file_import_bp
# from app.routes.user import user_bp
# app.register_blueprint(dashboard_bp)
# app.register_blueprint(file_import_bp)
# app.register_blueprint(user_bp)
# return app