You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
continuous-integration/drone/push Build is passing
Details
|
3 years ago | |
---|---|---|
templates | 8 years ago | |
.drone.yml | 3 years ago | |
README.md | 3 years ago | |
circle.yml | 6 years ago | |
tpongo2.go | 3 years ago | |
tpongo2_test.go | 3 years ago |
README.md
tpongo2

Middleware tpongo2 is a pongo2.v3 template engine support for Tango.
Installation
go get gitea.com/tango/tpongo2
Simple Example
package main
import (
"gitea.com/lunny/tango"
"gitea.com/tango/tpongo2"
"github.com/flosch/pongo2"
)
type RenderAction struct {
tpongo2.Renderer
}
func (a *RenderAction) Get() error {
return a.RenderString("Hello {{ name }}!", pongo2.Context{
"name": "tango",
})
}
func main() {
o := tango.Classic()
o.Use(tpongo2.New())
o.Get("/", new(RenderAction))
}