i’m learning webpy through this tutorial:
http://webpy.org/cookbook/application_processors
when i see this article i got confused,the two hooks seems like two methods that the web framework can invoke ,it says:
Load hooks and unload hooks can be used to do actions at begining and end of requests.
so what kind of situation will we do something before the request and at the end of the request?
“so what kind of situation will we do something before the request and at the end of the request?”
-> log, authenticate, (de-)compress,…
Or really anything you’ll want to do with any request decoupled from the handler.