Django / Python, calling a specific class / function for each user. Inquiry

I looked at the Django documentation for a way to do this, but didn’t see anything, although maybe I skipped it because I’m not sure where to look ... I want to be able to perform a specific action for each user request, for example, creating an instance of the class and calling one of its functions, however the only way I know to do it now is to put it in each view function. Is there a better way to do this, any advice would be appreciated.

+3
source share
1 answer

Do you want to use Django middleware .

+6
source

Source: https://habr.com/ru/post/1766098/


All Articles