from banjo.urls import route_get lessons_data = [ { "course": "Algebra 1", "unit": "Unit 9: Quadratic Functions", "topic": "Graphing Quadratic Functions", "title": "Intro to Quadratic Graphs", "objective": "Students will graph quadratic functions and identify key features.", "materials": "Graph paper and calculators", "warmup": "Review linear graphs", "activity": "Introduce standard form", "exit_ticket": "Short assessment", "notes": "Use visuals" }, { "course": "Algebra 1", "unit": "Unit 5: Linear Functions", "topic": "Slope Intercept Form", "title": "Graphing Linear Equations", "objective": "Students will graph lines in slope-intercept form.", "materials": "Notebook and graph paper", "warmup": "Review slope from a graph", "activity": "Practice graphing from y = mx + b", "exit_ticket": "Graph two linear equations", "notes": "Remind students that b is the y-intercept" }, { "course": "Algebra 1", "unit": "Unit 6: Systems of Equations", "topic": "Substitution", "title": "Solving Systems by Substitution", "objective": "Students will solve systems using substitution.", "materials": "Guided notes and worksheet", "warmup": "Solve a one-step equation", "activity": "Model substitution step-by-step", "exit_ticket": "Solve one system independently", "notes": "Go slowly on substitution" } ] @route_get("lessons") def lessons(params): return {"lessons": lessons_data} @route_get("units") def units(params): unit_names = sorted(set(lesson["unit"] for lesson in lessons_data)) return {"units": unit_names} @route_get("topics") def topics(params): topic_names = sorted(set(lesson["topic"] for lesson in lessons_data)) return {"topics": topic_names} @route_get("notes") def notes(params): notes_names = sorted(set(lesson["notes"] for lesson in lessons_data)) return {"notes": notes_names}