Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Make it possible to track all changes to models (aka history) #294

Closed
atodorov opened this Issue Apr 4, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@atodorov
Copy link
Member

atodorov commented Apr 4, 2018

At the moment it is not possible to track all changes to models.

There's a very poor history capabilities implemented but nothing like django papertrail.
OTOH there's also action logging implemented in some cases but it is still inconsistent and needs to be invoked manually before it records anything into the database.

So figure out how to implement this and we can resolve tons of related issues, see:

#216 and #292

@okainov

This comment has been minimized.

Copy link
Contributor

okainov commented Jun 13, 2018

Looks like it could be easily doable by replacing post_save to pre_save signal. In pre_save you can get "old" object instance and compare it to "new" kwargs["instance"].

@atodorov

This comment has been minimized.

Copy link
Member Author

atodorov commented Jul 2, 2018

looks like tracking changes with FieldTracker could be done easily and is generic enough that it can replace our home grown object History views:
http://django-model-utils.readthedocs.io/en/latest/utilities.html#field-tracker

I will investigate more.

@atodorov

This comment has been minimized.

Copy link
Member Author

atodorov commented Jul 2, 2018

atodorov added a commit that referenced this issue Jul 9, 2018

Add simple_history so we can track model changes. Fix #294
- we're using our own modification that automatically tracks changelog
- enable history for TestPlan model so we can adjust the rest of the
  code where necessary

atodorov added a commit that referenced this issue Jul 9, 2018

Add simple_history so we can track model changes. Fix #294
- we're using our own modification that automatically tracks changelog
- enable history for TestPlan model so we can adjust the rest of the
  code where necessary

atodorov added a commit that referenced this issue Jul 9, 2018

Add simple_history so we can track model changes. Fix #294
- we're using our own modification that automatically tracks changelog
- enable history for TestPlan model so we can adjust the rest of the
  code where necessary

atodorov added a commit that referenced this issue Jul 9, 2018

Add simple_history so we can track model changes. Fix #294
- we're using our own modification that automatically tracks changelog
- enable history for TestPlan model so we can adjust the rest of the
  code where necessary

@atodorov atodorov closed this in b17940d Jul 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.