How to run a python function on every Admin page load in Django
I would deal it with a simple way. Find a function the admin must execute such as save_model(). Then put your own function in it.
I would like a python function to be run any time a page from the admin interface is loaded.  This does not need to run on every page load(ie non-admin related pages).  This function requires the request object or the user id.
I know I could create a new view and call it from javascript from the page, but this seems like a horrible way of doing it.  Is there a way to somehow attach a function to admin page loads server side without adding any additional dependencies?
Update: the function is used to hook into a kind of logging system that keeps track of first/last interaction of each user each day that needs to be updated whenever the user uses the admin interface.  It would seem that a middleware app would allow me to do what I want to do, thank you guys!