create project and create model and dashboard
This commit is contained in:
47
app/__init__.py
Normal file
47
app/__init__.py
Normal 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
|
||||
Reference in New Issue
Block a user