Evalua Javiera uses Jinja2 as its server-side template engine, configured inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/groupTwoisTheBest/evaJav/llms.txt
Use this file to discover all available pages before exploring further.
main.py via Jinja2Templates(directory="templates"). All page templates follow the template inheritance pattern: a single base.html defines the full HTML document skeleton and exposes three named blocks — title, stylesheets, and content — which child templates override to inject their own markup. The per-page JavaScript file is loaded globally through the linkJs context variable that each route passes from main.py.
Template Overview
| Template | Route | Purpose | JS File |
|---|---|---|---|
base.html | — | Base layout with blocks | — |
index.html | / | Login form | index.js |
selectProfesor.html | /seleccionatuprofesor | Teacher dropdown | sele_prof.js |
calification_plataform.html | /calificaElProfesor | Rating form | cal_plataform.js |
certificado.html | /Agradecimiento | Confirmation | index.js |
base.html — The Base Layout
base.html is the root template from which every page template inherits. It renders the complete <!DOCTYPE html> wrapper and declares three overridable blocks:
{% block title %}— Sets the browser tab title. Defaults toEvaJavwhen not overridden.{% block stylesheets %}— Loads the page’s CSS. The default loadsstyle.cssvia FastAPI’surl_forhelper. Child templates can override this block to swap in a different stylesheet (for example,index.htmlloadsindex.cssinstead).{% block content %}— The main body area. This block is empty inbase.html; every child template is expected to override it with the page’s HTML markup.
index.html — Login Form
Extends base.html. Overrides {% block title %} with Evalua Javiera and {% block stylesheets %} to load index.css instead of the global stylesheet. The {% block content %} block renders a <form> with onsubmit="login(event)", two inputs (#username and #password), and a submit button.
selectProfesor.html — Teacher Selection
Extends base.html. Overrides {% block title %} with ¿A quién vas a evaluar? and {% block content %} with a form (id="Selectormestro") containing a <select id="maestro"> dropdown listing the available teachers. The sele_prof.js script listens for form submission.
calification_plataform.html — Rating Form
Extends base.html. Overrides {% block title %} with ¿A quién quieres evaluar? and {% block content %} with a form (id="calification") containing three rating <select> elements, each offering the options Malo, Regular, Bien, and Excelente. An empty <legend id="Selectormestro"> is populated at runtime by cal_plataform.js with the teacher’s name from localStorage.
certificado.html — Confirmation / Certificate
Extends base.html. Overrides {% block title %} with certificado and {% block content %} with a confirmation message inside a <form>. Displays an <h2> heading (“Certificado de Evaluación”), a thank-you message, and an anchor-wrapped <input type="button" value="Regresar"> that links back to /seleccionatuprofesor.
The linkJs Context Variable
Every route in main.py passes a linkJs dictionary to its template through the context argument:
base.html, the value is consumed as:
base.html never hard-codes a script path — the correct JS module is selected by whichever route renders the template, keeping the base layout completely generic.
