SQLite and JSON toggle support added

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Jason
2026-05-05 16:06:52 -05:00
parent 29154bd651
commit 0632aa22e1
12 changed files with 1862 additions and 136 deletions
+24
View File
@@ -0,0 +1,24 @@
"""
Application Configuration
Configure database backend and other settings
"""
import os
# Database Configuration
# Set to True to use SQLite, False to use JSON files
USE_DATABASE = False
# Database URI for SQLite
basedir = os.path.abspath(os.path.dirname(__file__))
DATABASE_URI = f"sqlite:///{os.path.join(basedir, 'data', 'products.db')}"
# JSON data directory
DATA_DIR = os.path.join(basedir, 'data')
# Session configuration
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = 'Lax'
# SQLAlchemy configuration
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ECHO = False # Set to True for SQL debugging