1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 08:50:51 +00:00

AutoRender为空时,不再编译模版

AutoRender为空,Controller.Render()不再执行,故无需编译模版
This commit is contained in:
wulove 2015-08-06 09:36:43 +08:00
parent 4857e38471
commit 57fdc308e3

View File

@ -306,11 +306,13 @@ func initBeforeHttpRun() {
}
go GlobalSessions.GC()
}
err := BuildTemplate(ViewsPath)
if err != nil {
if RunMode == "dev" {
Warn(err)
if AutoRender {
err := BuildTemplate(ViewsPath)
if err != nil {
if RunMode == "dev" {
Warn(err)
}
}
}