- Extraído CSS inline de 15 templates POS + 13 templates Dashboard - CSS movido a archivos .css externos en pos/static/css/ y dashboard/ - Generados .min.css vía minify-assets.sh - Nginx auto-serve transparente para .min.css - Tests: 73/73 pasando - Script: scripts/extract-inline-css.py
34 lines
918 B
Python
34 lines
918 B
Python
"""
|
|
Central configuration for Nexus Autoparts.
|
|
"""
|
|
import os
|
|
|
|
# Database
|
|
DB_URL = os.environ.get("DATABASE_URL")
|
|
if not DB_URL:
|
|
raise ValueError(
|
|
"DATABASE_URL environment variable is required. "
|
|
"Example: postgresql://user:pass@localhost/nexus_autoparts"
|
|
)
|
|
|
|
# Legacy SQLite path (used only by migration script)
|
|
SQLITE_PATH = os.path.join(
|
|
os.path.dirname(os.path.abspath(__file__)),
|
|
"vehicle_database", "vehicle_database.db"
|
|
)
|
|
|
|
# JWT Authentication
|
|
JWT_SECRET = os.environ.get("JWT_SECRET")
|
|
if not JWT_SECRET:
|
|
raise ValueError(
|
|
"JWT_SECRET environment variable is required. "
|
|
"Generate one with: python3 -c 'import secrets; print(secrets.token_hex(32))'"
|
|
)
|
|
|
|
JWT_ACCESS_EXPIRES = 900 # 15 minutes
|
|
JWT_REFRESH_EXPIRES = 2592000 # 30 days
|
|
|
|
# Application identity
|
|
APP_NAME = "NEXUS AUTOPARTS"
|
|
APP_SLOGAN = "Tu conexión directa con las partes que necesitas"
|