修复删除项目BUG

This commit is contained in:
Minho
2017-05-09 18:17:08 +08:00
parent aad8ebf8ae
commit d012624ac5
3 changed files with 21 additions and 15 deletions

View File

@@ -12,9 +12,8 @@ import (
"github.com/astaxie/beego/orm"
"github.com/astaxie/beego/logs"
"github.com/lifei6671/godoc/conf"
"github.com/lifei6671/gocaptcha"
"syscall"
)
// RegisterDataBase 注册数据库
@@ -32,7 +31,13 @@ func RegisterDataBase() {
orm.RegisterDataBase("default", "mysql", dataSource)
orm.DefaultTimeLoc, _ = time.LoadLocation(timezone)
location , err := time.LoadLocation(timezone);
if err == nil {
orm.DefaultTimeLoc = location
}else{
fmt.Println(err)
}
}
// RegisterModel 注册Model
@@ -146,7 +151,6 @@ func RegisterFunction() {
}
func init() {
syscall.Setenv("ZONEINFO","./lib/time/zoneinfo.zip")
gocaptcha.ReadFonts("./static/fonts", ".ttf")
gob.Register(models.Member{})
}