1、实现网站首页

2、实现文档阅读
3、实现项目发布
4、实现用户权限
This commit is contained in:
lifei6671
2017-04-30 22:13:12 +08:00
parent d38417535a
commit ad67558b80
36 changed files with 1486 additions and 233 deletions

View File

@@ -4,13 +4,15 @@ import (
"fmt"
"net/url"
"time"
"os"
"encoding/gob"
"github.com/lifei6671/godoc/models"
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
"github.com/astaxie/beego/logs"
"os"
"github.com/lifei6671/godoc/conf"
)
// RegisterDataBase 注册数据库
@@ -75,7 +77,7 @@ func RegisterLogger() {
logs.EnableFuncCallDepth(true)
logs.Async()
beego.BeeLogger.DelLogger("console")
//beego.BeeLogger.DelLogger("console")
beego.SetLogger("file",`{"filename":"logs/log.log"}`)
beego.SetLogFuncCall(true)
beego.BeeLogger.Async()
@@ -100,4 +102,8 @@ func RegisterCommand() {
func RegisterFunction() {
beego.AddFuncMap("config",models.GetOptionValue)
}
func init() {
gob.Register(models.Member{})
}