Files
piano-plan/check_time_local.py

10 lines
369 B
Python

from app import create_app, db
from app.models import PracticePlan
# Query local dev database (same data as production)
app = create_app()
with app.app_context():
plans = PracticePlan.query.order_by(db.desc("created_at")).limit(5).all()
for p in plans:
print(f"ID:{p.id} | created_at:{p.created_at} | student:{p.student.name if p.student else 'N/A'}")