Closed ErSauravAdhikari closed 1 year ago
Hey - thank you! I'm glad to hear it's been useful for you. I'm hoping to finally have some time to get back to working on it soon. I have some ideas for improvements, etc.
I've never used Pongo2, or any alternative template engine. The nice thing about Pagoda is that all template operations are isolated to the Template renderer. You should be able to make changes in there to use Pongo2 rather than the standard library's template package. You may also need to adjust some of the constants in the config package.
Give that a try and report back. It would be good to document what you tried here so others who want to use Pongo2 can have this as a reference.
I am using Po go also @ErSauravAdhikari
@mikestefanello Is this something you would take a PR for or do you not want it in this repo ?
@gedw99 I don't think so unless there was a really compelling reason to include it over the standard template library; and over the other alternatives. It would be good to provide some documentation here to explain how to perform this replacement. If the procedure is very similar for other template libraries, I can include instructions in the README.
I am using Po go also @ErSauravAdhikari
@mikestefanello Is this something you would take a PR for or do you not want it in this repo ?
Hmm, could you please dive more deeper into how you integrated pongo in pagoda system? (Assuming po go is a typo)
@mikestefanello Thanks, I'll check the template renderer and config out.
@mikestefanello will do...
@ErSauravAdhikari you want to know how to get it rolling ?
@mikestefanello will do...
@ErSauravAdhikari you want to know how to get it rolling ?
Yeah!
I am doing it this way...
https://github.com/mikestefanello/pagoda/blob/main/pkg/services/template_renderer.go is the current one.
Make a new one called for example "services/template__pongo2_renderer.go"
Then implement the calls... to https://github.com/flosch/pongo2
I am doing it this way...
https://github.com/mikestefanello/pagoda/blob/main/pkg/services/template_renderer.go is the current one.
Make a new one called for example "services/template__pongo2_renderer.go"
Then implement the calls... to https://github.com/flosch/pongo2
If possible can you share the template__pongo2renderer in a gist [1]_ or sth similar?
when i am finished I will put on github and then put the link here.
wont be for a while though.
when i am finished I will put on github and then put the link here.
wont be for a while though.
Alright, thanks.
I love pagoda. It's an excellent piece of software.
However, I do feel like the default template engine from Golang std lib is quite limited. Specially since, HTMX could benefit from a lot of features not found in go's official templating library.
Hence, I wanted to use Pongo2 (Similar to Django's template engine). How do I go about that?