-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
23 lines (20 loc) · 810 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package django
import "github.com/flosch/pongo2"
// Config for django template engine
type Config struct {
// Filters for pongo2, map[name of the filter] the filter function . The filters are auto register
Filters map[string]pongo2.FilterFunction
// Globals share context fields between templates. https://github.com/flosch/pongo2/issues/35
Globals map[string]interface{}
// DebugTemplates enables template debugging.
// The verbose error messages will appear in browser instead of quiet passes with error code
DebugTemplates bool
}
// DefaultConfig returns the default configuration for the django template engine
func DefaultConfig() Config {
return Config{
Filters: make(map[string]pongo2.FilterFunction),
Globals: make(map[string]interface{}, 0),
DebugTemplates: false,
}
}