func (s *DjangoEngine) AddFunc(funcName string, funcBody interface{}) {
	s.rmu.Lock()
	s.globals[funcName] = funcBody
	s.rmu.Unlock()
}
AddFunc adds the function to the template's Globals.
It is legal to overwrite elements of the default actions:
- url func(routeName string, args ...string) string
- urlpath func(routeName string, args ...string) string
- render func(fullPartialName string) (template.HTML, error).
package view
import (
	"bytes"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	stdPath "path"
	"path/filepath"
	"strings"
	"sync"
	"github.com/flosch/pongo2"
	"github.com/kataras/iris/context"
)
type (
	Value pongo2.Value
	Error pongo2.Error
	FilterFunction func(in *Value, param *Value) (out *Value, err *Error)
	Parser pongo2.Parser
	Token pongo2.Token
	INodeTag pongo2.INodeTag
	TagParser func(doc *Parser, start *Token, arguments *Parser) (INodeTag, *Error)
)
func AsValue(i interface{}) *Value {
	return (*Value)(pongo2.AsValue(i))
}
func AsSafeValue(i interface{}) *Value {
	return (*Value)(pongo2.AsSafeValue(i))
}
func (value *Value) GetValue() *pongo2.Value {
	return (*pongo2.Value)(value)
}
func (error *Error) GetError() *pongo2.Error {
	return (*pongo2.Error)(error)
}
func (parser *Parser) GetParser() *pongo2.Parser {
	return (*pongo2.Parser)(parser)
}
func (token *Token) GetToken() *pongo2.Token {
	return (*pongo2.Token)(token)
}
type tDjangoAssetLoader struct {
	baseDir  string
	assetGet func(name string) ([]byte, error)
}
func (dal *tDjangoAssetLoader) Abs(base, name string) string {
	if stdPath.IsAbs(name) {
		return name
	}
	return stdPath.Join(dal.baseDir, name)
}
func (dal *tDjangoAssetLoader) Get(path string) (io.Reader, error) {
	if stdPath.IsAbs(path) {
		path = path[1:]
	}
	res, err := dal.assetGet(path)
	if err != nil {
		return nil, err
	}
	return bytes.NewBuffer(res), nil
}
type DjangoEngine struct {
	directory string
	extension string
	assetFn   func(name string) ([]byte, error)  
	namesFn   func() []string                    
	reload    bool
	rmu sync.RWMutex  
	filters map[string]FilterFunction
	globals       map[string]interface{}
	mu            sync.Mutex  
	templateCache map[string]*pongo2.Template
}
var _ Engine = &DjangoEngine{}
func Django(directory, extension string) *DjangoEngine {
	s := &DjangoEngine{
		directory:     directory,
		extension:     extension,
		globals:       make(map[string]interface{}, 0),
		filters:       make(map[string]FilterFunction, 0),
		templateCache: make(map[string]*pongo2.Template, 0),
	}
	return s
}
func (s *DjangoEngine) Ext() string {
	return s.extension
}
func (s *DjangoEngine) Binary(assetFn func(name string) ([]byte, error), namesFn func() []string) *DjangoEngine {
	s.assetFn, s.namesFn = assetFn, namesFn
	return s
}
func (s *DjangoEngine) Reload(developmentMode bool) *DjangoEngine {
	s.reload = developmentMode
	return s
}