Removed code duplicated from django's `ModelAdmin` and `ChangeList`.