There is an interesting scenario regarding automation of routines related to model.
I want make my model in such a way that, everytime it is modified by some user, it should automatically set “modified by” field with current logged in user.
first step is to override “save” method in model, do update fields as you require and call super class save method.
but the question is, how model can access logged in user object, there is no request object wright?
there is a way with thread locals to deal with this kind of situation, click on following link
thread local and user objct in django models