Files
piano-plan/check_time.py
T

8 lines
315 B
Python

from app import create_app, db
from app.models import PracticePlan
app = create_app()
with app.app_context():
plans = PracticePlan.query.order_by(db.desc("created_at")).limit(3).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'}")