{"id":19163679,"url":"https://github.com/stnc/pongo2echo","last_synced_at":"2025-05-07T11:22:41.585Z","repository":{"id":57516583,"uuid":"245749940","full_name":"stnc/pongo2echo","owner":"stnc","description":"This package provides a middleware that can be used to render pongo2 templates for ECHO framework","archived":false,"fork":false,"pushed_at":"2022-09-30T15:47:40.000Z","size":148,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T21:26:17.990Z","etag":null,"topics":["golang","golang-application"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stnc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-08T04:11:45.000Z","updated_at":"2023-09-05T13:56:07.000Z","dependencies_parsed_at":"2023-01-18T22:45:51.099Z","dependency_job_id":null,"html_url":"https://github.com/stnc/pongo2echo","commit_stats":null,"previous_names":["stnc/pongorendererecho4","stnc/pongo-renderer-echo4"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stnc%2Fpongo2echo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stnc%2Fpongo2echo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stnc%2Fpongo2echo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stnc%2Fpongo2echo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stnc","download_url":"https://codeload.github.com/stnc/pongo2echo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252866234,"owners_count":21816423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","golang-application"],"created_at":"2024-11-09T09:16:19.761Z","updated_at":"2025-05-07T11:22:41.565Z","avatar_url":"https://github.com/stnc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pongo2echo\n=========\n\nPackage pongo2echo is a template renderer that can be used with the minimalist Go web framework\nhttps://github.com/labstack/echo it uses the Pongo2 template library\nhttps://github.com/flosch/pongo2\n\npongo2 is a Django-syntax like templating-language (official website).\n\n## Installation  \n\n`go get \"github.com/stnc/pongo2echo\"`\n\n## Here is Compatible with pongo version 4\n [Pongo4echo](https://github.com/stnc/pongo4echo) - pongo2 echo framework stability renderer / Compatible with pongo version 4\n\n# please don't forget to give stars :)\n\n\n\nRequirements\n------------\n\nRequires Echo 4+ or higher and Pongo2.\n\nUsage\n-----\n\nReal Example [echo+pongo+gorm+pagination]\n\nhttps://github.com/stnc/golang-echo-realworld-example-web-app\n\n![Screen](https://raw.githubusercontent.com/stnc/pongo2echo/master/example/echoScreen.png)\n\nBasic Example\n-------------\n\n```go\npackage main\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/flosch/pongo2\"\n\t\"github.com/labstack/echo/v4\"\n\t\"github.com/stnc/pongo2echo\"\n)\n\nvar (\n\tdata         = pongo2.Context{}\n\tmainRenderer = pongo2echo.Renderer{Debug: true} // use any renderer\n)\n\n//GetAllData all list\nfunc GetAllData(c echo.Context) error {\n\n\tposts := []string{\n\t\t\"Larry Ellison\",\n\t\t\"Carlos Slim Helu\",\n\t\t\"Mark Zuckerberg\",\n\t\t\"Amancio Ortega \",\n\t\t\"Jeff Bezos\",\n\t\t\" Warren Buffet \",\n\t\t\"Bill Gates\",\n\t\t\"selman tunç\",\n\t}\n\n\treturn c.Render(http.StatusOK, \"templates/index.html\",\n\t\tpongo2.Context{\"title\": \"hello echo fw\", \"posts\": posts})\n\n}\n\nfunc main() {\n\te := echo.New()\n\te.Renderer = mainRenderer //pongo2 init\n\te.Debug = true\n\t// http://localhost:8888/home\n\te.GET(\"/home\", GetAllData)\n\t// Start server\n\te.Logger.Fatal(e.Start(\":8888\"))\n}\n\n```\n\nHTML \n----------------\n\n\n```html\n\n\u003ch1\u003e {{ title }}\u003c/h1\u003e\n\n{% for post in posts%}\n\u003cul\u003e\n  \u003cli\u003e{{post}}\u003c/li\u003e\n\u003c/ul\u003e\n{% endfor %}\n\n```\n\n\nGoDoc\n-----\n\n\nSpecials Thanks\n-----\n\nhttps://github.com/siredwin/pongorenderer Version 3\n\nhttps://machiel.me/post/pongo2-with-echo-or-net-http/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstnc%2Fpongo2echo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstnc%2Fpongo2echo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstnc%2Fpongo2echo/lists"}