From 152c6af97e34199789b3afd49f3ab967c6c85823 Mon Sep 17 00:00:00 2001 From: Piotr Orzechowski Date: Wed, 8 Aug 2018 13:15:48 +0200 Subject: Fix custom templates being ignored (#4638) --- modules/templates/static.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/templates/static.go') diff --git a/modules/templates/static.go b/modules/templates/static.go index c16b18cc08..6fd4d245e1 100644 --- a/modules/templates/static.go +++ b/modules/templates/static.go @@ -112,13 +112,11 @@ func NewTemplateFileSystem() templateFileSystem { return fs } -var tplFileSys = NewTemplateFileSystem() - // HTMLRenderer implements the macaron handler for serving HTML templates. func HTMLRenderer() macaron.Handler { return macaron.Renderer(macaron.RenderOptions{ Funcs: NewFuncMap(), - TemplateFileSystem: tplFileSys, + TemplateFileSystem: NewTemplateFileSystem(), }) } @@ -126,7 +124,7 @@ func HTMLRenderer() macaron.Handler { func JSONRenderer() macaron.Handler { return macaron.Renderer(macaron.RenderOptions{ Funcs: NewFuncMap(), - TemplateFileSystem: tplFileSys, + TemplateFileSystem: NewTemplateFileSystem(), HTMLContentType: "application/json", }) } -- cgit v1.2.3