gofiber / template

🧬 Template engine middleware for Fiber
https://docs.gofiber.io/guide/templates
MIT License
265 stars 52 forks source link

🚀 Can I register filters when using django template engine? #172

Open xiayulu opened 2 years ago

xiayulu commented 2 years ago

Is your feature request related to a problem? Yes.

Describe the solution you'd like I want build some custom Django template filters like dict.

But I can find the Register API.

Can django template engine expose the filters Registers API?

Thanks ❤.

Describe alternatives you've considered We can expose a method Register. So we can register filters like:

engine := django.New("./templates", ".html")
engine.Register(Dict)
app := fiber.New(fiber.Config{
    Views: engine,
})

That's awesome.

Additional context

welcome[bot] commented 2 years ago

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord