I have to track the history of all of changes, which occure to my models. I also keep track of user making this changes. For now I was dealing with in views.py but I would like to utilitize this functionallity using django signals like pre_save
, pre_delete
for each of models.
The question are:
1) what is the best way to access there request.user ?
2) What about using Django Admin Logs
mentioned here: Storing user activity in Django for accesing user history events?
3) What about the approach of using CurrentUserMiddleware
mentioned here:
Django: Populate user ID when saving a model
I find the way in 3) very sexy, but does it have some drawbacks?