Initial import: shopdb-flask multi-site asset platform
Flask + Vue rewrite of the classic-ASP shopdb, built as a plugin framework so sister GE Aerospace sites can adopt it. Product version 0.7.0-pre-0.8.0, plugin contract 0.11.0, 966 backend tests. Key entry points: - docs/INSTALL-WINDOWS-IIS.md - tested Windows + IIS install runbook (own-site and subpath deployment methods) - docs/PILOT-DEPLOY.md - production pilot: stand up + import + verify - docs/IMPORT-API.md - schema-agnostic legacy data import contract - scripts/site_imports/wjf/ - West Jefferson reference import loader - docs/adr/ - twelve accepted architecture decision records
This commit is contained in:
28
shopdb/extensions.py
Normal file
28
shopdb/extensions.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Flask extensions initialization."""
|
||||
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_migrate import Migrate
|
||||
from flask_jwt_extended import JWTManager
|
||||
from flask_cors import CORS
|
||||
from flask_marshmallow import Marshmallow
|
||||
from flask_caching import Cache
|
||||
|
||||
# Initialize extensions without app
|
||||
db = SQLAlchemy()
|
||||
migrate = Migrate()
|
||||
jwt = JWTManager()
|
||||
cors = CORS()
|
||||
ma = Marshmallow()
|
||||
cache = Cache()
|
||||
|
||||
|
||||
def init_extensions(app):
|
||||
"""Initialize all Flask extensions with app."""
|
||||
db.init_app(app)
|
||||
migrate.init_app(app, db)
|
||||
jwt.init_app(app)
|
||||
cors.init_app(app, resources={
|
||||
r"/api/*": {"origins": app.config.get('CORS_ORIGINS', '*')}
|
||||
})
|
||||
ma.init_app(app)
|
||||
cache.init_app(app)
|
||||
Reference in New Issue
Block a user