Files
project_banjo_app/lesson_app/app/views.py
jkissane2 f4f1dd86d4 Finished Banjo App
I am proud of the work I have done on this project.
I first started out with just the "lessons" endpoint and I didn't like
how the material was organized so I added the "topics" endpoint and "unit"
endpoint to make it easier to find lessons on a specific topic or unit.
I also added the "notes" endpoint to make it easier to find reflections on
specific lessons. I am really happy wth how my app turned out and I am
glad I chose something I can actually use. I am excited to add more
lesson plans in the future especially if I teach different
classes to help me stay organized.
2026-04-02 10:18:51 -04:00

62 lines
2.1 KiB
Python

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}