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
Support for changes in related models #17
Labels
Comments
Did some research:
Nice detail: the last method is currently working. Take the following example: class MyModel(models.Model):
related = models.ManyToManyField('MySecondaryModel')
auditlog.register(MyModel, exclude_fields['related']) # At this point unsure whether the exclusion is mandatory
auditlog.register(MyModel.related.through)
# Get related log entries
obj = MyModel.objects.first()
rel_pks = obj.related.all().values_list('id', flat=True)
related_logentries = LogEntry.objects.get_for_model(MyModel.related.through).filter(object_id__in=rel_pks) Parts of this example can be reworked into utility methods to make using them cleaner and more straightforward. Ideas? Did I miss something? Please let me know! |
Moved to 0.5.0 release to quickly ship improvements for Django 1.10. |
Found another case I think of the fixture loading not working:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, as discovered in #8, Auditlog does not behave well when it comes to related data.
The following needs improvement:
The text was updated successfully, but these errors were encountered: