forked from jazzband/django-simple-history
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More properly display related objs in admin diff
`ForeignKey` objects are now displayed using their `__str__()` methods. `ManyToManyField` objects are displayed using their `__repr__()` methods (which call `__str__()` by default) - since they're converted to a string while inside a list. Discussion: I could've made `format_history_delta_change_value()` return a list of normal `str()` representations (instead of `repr()`) for M2M fields, but decided against it, as it would have prevented users from taking advantage of the "meta" code in our implementation of the method for getting the actual M2M objects. I guess it can be done once jazzband#1058 has a fix, though - as then the "meta" code wouldn't be needed.
- Loading branch information
Showing
3 changed files
with
113 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters