12 lines
271 B
Python
12 lines
271 B
Python
import os
|
|
import sys
|
|
|
|
# Ensure project root is importable
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
from app import app
|
|
from models import init_db
|
|
|
|
with app.app_context():
|
|
init_db()
|
|
print(f"Database initialized at {app.config['DATABASE']}")
|