martenframework / marten

The pragmatic web framework.
https://martenframework.com
MIT License
405 stars 23 forks source link

Add a before_render handler callback #113

Closed ellmetha closed 8 months ago

ellmetha commented 1 year ago

Description

It would be interesting to provide a new callback allowing to execute code right before a template is rendered when generating an HTTP response in a handler. Such callbacks should be executed in the following situations:

Such callbacks could be used to insert additional data in a template context for example.