示例#1
0
func setupView(server *server.Server) {
	defer server.Timef("#info Finished loading templates in %s", time.Now())

	view.Production = server.Production()
	err := view.LoadTemplates()
	if err != nil {
		server.Fatalf("Error reading templates %s", err)
	}

}
示例#2
0
func setupView(server *server.Server) {
	defer server.Timef("#info Finished loading templates in %s", time.Now())

	// A very limited translation - would prefer to use editable.js
	// instead and offer proper editing TODO: move to editable.js instead
	view.Helpers["markup"] = markup
	view.Helpers["timeago"] = timeago

	view.Production = server.Production()
	err := view.LoadTemplates()
	if err != nil {
		server.Fatalf("Error reading templates %s", err)
	}

}