rework template rendering, cache parsed templates
adapt error wrapping principle
This commit is contained in:
parent
7a1448d6f9
commit
f04396809d
21 changed files with 175 additions and 82 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue