Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

kwiscale/template-pongo2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Kwiscale addon to use Pongo2 template engine

That addon can be used with Kwiscale (please use gopkg.in url [http://gopkg.in/kwiscale/framework.v0] instead) to use Pongo2 template engine.

How to

At this time, we're in alpha stage so please use "v0" that is the "master" version

Install addon with

go get gopkg.in/kwiscale/framework.v1
go get gopkg.in/kwiscale/template-pongo2.v1

It's important to use the same version for framework and template.

Then in you application:

import (
    "gopkg.in/kwiscale/framework.v1"
    _ "gopkg.in/kwiscale/template-pongo2.v1"
)

Note the required "_" that will only run "init".

Then, in configuration:

app := kwiscale.NewApp(&kwiscale.Config{
    TemplateEngine : "pongo2",
    TeplateDir : "./templates",
})
//...

Render() method in handlers will use Pongo2.