Design a backend-rendered hierarchical vote tally layout for a campus election system.
The structure must represent vote counts broken down by Year Level, then Department, then Course, then Track, in a clearly indented and nested format.
No JavaScript data rendering. All data must be passed from the Python backend and rendered using a server-side template engine (e.g. Jinja).
Display format requirements:
Top-level groups are Year Levels (e.g., “1st Year”, “2nd Year”).
Within each year, group by Department (e.g., “CCSICT”), showing its total vote count.
Under each Department, display Courses (e.g., “BSIT”, “BSCS”), each with their own total vote count.
Under each Course, show individual Tracks (e.g., “Networking Security”, “Web & Mobile App Dev”) with their respective vote counts.
Layout style:
Use nested indentation or visual hierarchy (margins or collapsible sections if allowed).
Each level must display the name and its aggregate vote total.
Use bold text or font size to denote hierarchy levels (Year > Department > Course > Track).
Ensure consistent padding and alignment across all levels.
At the top, include a dropdown to export the vote tally based on scope (Year, Department, Course, Track, or All). Include a "Download" button to submit via POST to a backend export route.
Use the following example structure in the output:
markdown
Copy
Edit
1st Year
CCSICT – 430 votes
BSIT – 250 votes
• Networking Security – 140 votes
• Web and Mobile App Dev – 110 votes
BSCS – 180 votes
• AI Track – 90 votes
• Data Science – 90 votes
2nd Year
CCSICT – 520 votes
BSIT – 310 votes
• Networking Security – 160 votes
• Web and Mobile App Dev – 150 votes
BSCS – 210 votes
• AI Track – 110 votes
• Data Science – 100 votes
All data rendering must occur server-side. No client-side script inclusion or manipulation.