rework template rendering, cache parsed templates

adapt error wrapping principle
This commit is contained in:
Johannes 2022-09-24 15:01:33 +02:00
parent 7a1448d6f9
commit f04396809d
21 changed files with 175 additions and 82 deletions

View file

@ -5,6 +5,7 @@ import (
"log"
"net/http"
"officeHours/models"
"officeHours/templating"
"strconv"
)
@ -58,5 +59,5 @@ func (b *BaseHandler) writeTimetablePage(w http.ResponseWriter, req *http.Reques
SelectedRoom int
SelectedCourse int
}{courses, rooms, timetable, selectedRoom, selectedCourse}
b.serveTemplate(w, "index", data)
templating.ServeTemplate(w, "index", data)
}