Fix the typeahead

This commit is contained in:
Las Zenow 2018-04-09 19:14:11 +00:00
parent a40b5ac534
commit 0c2e35bb80
2 changed files with 6 additions and 9 deletions

View file

@ -10,6 +10,7 @@ import (
"errors"
"net/http"
"path"
"strings"
"time"
"gitlab.com/trantor/trantor/lib/database"
@ -57,7 +58,9 @@ func InitTemplate(assetsPath string) *Template {
var t Template
templatePath := path.Join(assetsPath, "templates")
t.html, err = html_tmpl.ParseGlob(path.Join(templatePath, "*.html"))
t.html, err = html_tmpl.New("html").Funcs(html_tmpl.FuncMap{
"strings_join": strings.Join,
}).ParseGlob(path.Join(templatePath, "*.html"))
if err != nil {
log.Critical("Error loading html templates: ", err)
}