Skip to content
This repository has been archived by the owner. It is now read-only.
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

tpongo2 Build Status

Middleware tpongo2 is a pongo2.v3 template engine support for Tango.

Installation

go get github.com/tango-contrib/tpongo2

Simple Example

package main

import (
    "github.com/lunny/tango"
    "github.com/flosch/pongo2"
    "github.com/tango-contrib/tpongo2"
)

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))
}

Getting Help

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.