2

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?

Community
  • 1
  • 1
andilabs
  • 22,159
  • 14
  • 114
  • 151

1 Answers1

1

This huge list of packages should do the trick

I personally like the look of:

  • DJANGO REVERSION
  • DJANGO-SIMPLE-HISTORY
  • DJANGO-REVISIONS

because of their rollback functionality.

I can't personally vouch for any of them, not having used them before. Seriously considering changing that though...

OldTinfoil
  • 1,187
  • 19
  • 32