sanic-org / sanic-ext

Extended Sanic functionality
https://sanic.dev/en/plugins/sanic-ext/getting-started.html
MIT License
50 stars 36 forks source link

[Feature Request] Blueprints cannot access the 'decorator way' of managing / rendering templates #216

Open carzilla opened 1 year ago

carzilla commented 1 year ago

Is your feature request related to a problem? Please describe your use case. It's not a huge problem, but in my project I love to do the 'decorator way' of managing templating, as per documentation @app.ext.template("foo.html").

If you use a Blueprint however, you cannot do @bp.ext.template.

Describe the solution you'd like It would be amazing if you can uniformly use the same ways of rendering templates in blueprints too.

Additional context It's not a big issue of course, but I genuinely appreciate how pretty it looks with a decorator and then returning a dict, so I'd love to be able to keep the same style in all parts of my projects.