()
| 276 | } |
| 277 | |
| 278 | func (s *DjangoEngine) initSet() { // protected by the caller. |
| 279 | if s.Set == nil { |
| 280 | s.Set = pongo2.NewSet("", &tDjangoAssetLoader{fs: s.fs, rootDir: s.rootDir}) |
| 281 | s.Set.Globals = getPongoContext(s.globals) |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | // getPongoContext returns the pongo2.Context from map[string]interface{} or from pongo2.Context, used internaly |
| 286 | func getPongoContext(templateData interface{}) pongo2.Context { |
no test coverage detected