{"action":"created","issue":{"url":"https://api.github.com/repos/revel/revel/issues/1348","repository_url":"https://api.github.com/repos/revel/revel","labels_url":"https://api.github.com/repos/revel/revel/issues/1348/labels{/name}","comments_url":"https://api.github.com/repos/revel/revel/issues/1348/comments","events_url":"https://api.github.com/repos/revel/revel/issues/1348/events","html_url":"https://github.com/revel/revel/issues/1348","id":339897577,"node_id":"MDU6SXNzdWUzMzk4OTc1Nzc=","number":1348,"title":"A clarification about RegisterTemplateLoader","user":{"login":"golddranks","id":2675542,"node_id":"MDQ6VXNlcjI2NzU1NDI=","avatar_url":"https://avatars1.githubusercontent.com/u/2675542?v=4","gravatar_id":"","url":"https://api.github.com/users/golddranks","html_url":"https://github.com/golddranks","followers_url":"https://api.github.com/users/golddranks/followers","following_url":"https://api.github.com/users/golddranks/following{/other_user}","gists_url":"https://api.github.com/users/golddranks/gists{/gist_id}","starred_url":"https://api.github.com/users/golddranks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golddranks/subscriptions","organizations_url":"https://api.github.com/users/golddranks/orgs","repos_url":"https://api.github.com/users/golddranks/repos","events_url":"https://api.github.com/users/golddranks/events{/privacy}","received_events_url":"https://api.github.com/users/golddranks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-10T15:36:09Z","updated_at":"2018-07-10T19:08:18Z","closed_at":"2018-07-10T19:08:18Z","author_association":"NONE","body":"On the page https://revel.github.io/manual/template-engine.html it says that\r\n\r\n> To register a new engine in Revel :\r\n> \r\n> - Define it as a module to be loaded in the app.conf.\r\n> - In an init() function, which registers the engine in revel by calling:\r\n> RegisterTemplateLoader(key string, loader func(loader *TemplateLoader) (TemplateEngine, error)) (err error)\r\n> - Specify the template engines to be used by setting the template.engines configuration option to the names of the engine to be used (a comma delimited list).\r\n\r\nI haven't been able to successfully get pongo2 working; it errors with:\r\n\r\n    ERROR 00:24:13  revel harness.go:100: Template loader error                     error=\"Panic (Template Loader): Unknown template engine name - pongo2.\"\r\n\r\nI suspect it's because I don't call `RegisterTemplateLoader` in the `init()` – but the documentation is really unclear that. Is `RegisterTemplateLoader` called by Revel or am I supposed to call it? The documentation shows the function signature but doesn't tell how it should be called. There isn't any code examples.\r\n\r\nI didn't even manage to find a single example that uses revel and pongo2 with Google. Is pongo2 actually working with revel currently?"},"comment":{"url":"https://api.github.com/repos/revel/revel/issues/comments/403933655","html_url":"https://github.com/revel/revel/issues/1348#issuecomment-403933655","issue_url":"https://api.github.com/repos/revel/revel/issues/1348","id":403933655,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzkzMzY1NQ==","user":{"login":"notzippy","id":1387526,"node_id":"MDQ6VXNlcjEzODc1MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1387526?v=4","gravatar_id":"","url":"https://api.github.com/users/notzippy","html_url":"https://github.com/notzippy","followers_url":"https://api.github.com/users/notzippy/followers","following_url":"https://api.github.com/users/notzippy/following{/other_user}","gists_url":"https://api.github.com/users/notzippy/gists{/gist_id}","starred_url":"https://api.github.com/users/notzippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notzippy/subscriptions","organizations_url":"https://api.github.com/users/notzippy/orgs","repos_url":"https://api.github.com/users/notzippy/repos","events_url":"https://api.github.com/users/notzippy/events{/privacy}","received_events_url":"https://api.github.com/users/notzippy/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T19:08:18Z","updated_at":"2018-07-10T19:08:18Z","author_association":"COLLABORATOR","body":"That description is the process to create a new template engine, [This](https://revel.github.io/manual/templates.html) describes using an existing engine. The Pongo2 engine and the Ace engine are both existing template engines that work in Revel."}}
{"actor":{"display_login":"notzippy"}}