dominno / django-moderation

django-moderation is reusable application for Django framework, that allows to moderate any model objects.
BSD 3-Clause "New" or "Revised" License
269 stars 90 forks source link

Diff - resolve foreign key #106

Closed SamTShaw closed 10 years ago

SamTShaw commented 10 years ago

This is a small change to the diff functions that allows "resolving" a ForeignKey field so that it displays something human-readable instead of whatever the key is.

For example, when the moderated object has a ForeignKey referencing a User, instead of the User's pk being displayed in the diff, the string representation of the User is displayed. Instead of 1 - 4 being displayed for a change, admin - moderator would be displayed.