After some time working with ruby, I will return to python. I work with a flask.
How to implement a filter to start a method in a request when starting a controller action without sending the same code to each controller? My first guess is to build some kind of decorator (for example, @before_request, but this did not seem at first glance). I just get (re) getting to know python, and there are a few things that are not available, so any input is appreciated. Equivalent is before_filter in Rails or before that in Sinatra.
source share