1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

add m.NotFound handler

This commit is contained in:
FuXiaoHei
2014-03-23 13:48:01 +08:00
parent 47493a0191
commit bdd32f152d
2 changed files with 10 additions and 0 deletions

View File

@@ -20,5 +20,12 @@ func Home(ctx *middleware.Context) {
func Help(ctx *middleware.Context) {
ctx.Data["PageIsHelp"] = true
ctx.Data["Title"] = "Help"
ctx.HTML(200, "help")
}
func NotFound(ctx *middleware.Context) {
ctx.Data["PageIsNotFound"] = true
ctx.Data["Title"] = 404
ctx.Handle(404, "home.NotFound", nil)
}