deploy: english UI + admin creds + dataset wiring
Browse files
app.py
CHANGED
|
@@ -64,7 +64,11 @@ def _run_pending_migrations_inline() -> None:
|
|
| 64 |
configured DB URL is SQLite; non-SQLite deployments would use a
|
| 65 |
real migration tool.
|
| 66 |
"""
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
if not db_url.startswith("sqlite"):
|
| 69 |
return
|
| 70 |
import sqlite3
|
|
|
|
| 64 |
configured DB URL is SQLite; non-SQLite deployments would use a
|
| 65 |
real migration tool.
|
| 66 |
"""
|
| 67 |
+
# Read the effective URL from PANEL_CONFIG, not os.getenv — on HF
|
| 68 |
+
# Spaces the env var ``PANEL_DATABASE_URL`` is NOT always set and
|
| 69 |
+
# the panel falls back to ``config.py``'s default. Reading from
|
| 70 |
+
# PANEL_CONFIG gives us the *actual* URL the runtime will use.
|
| 71 |
+
db_url = (PANEL_CONFIG.database_url or "").strip()
|
| 72 |
if not db_url.startswith("sqlite"):
|
| 73 |
return
|
| 74 |
import sqlite3
|