Exemple #1
0
func (this *ViewController) Get() {
	id, _ := strconv.Atoi(this.Ctx.Params[":id"])
	this.Data["Post"] = models.GetBlog(id)
	this.Layout = "layout.tpl"
	this.TplNames = "view.tpl"
}
Exemple #2
0
func (this *DeleteController) Get() {
	id, _ := strconv.Atoi(this.Ctx.Params[":id"])
	models.DelBlog(models.GetBlog(id))
	this.Ctx.Redirect(302, "/")
}