That said, I'm now realizing that one downside of this approach is that there's no way to get more information about the selected user. With the other approach, clicking on "varma" takes you to the Django change view for that user, so that if you have any doubts, it's easy to see who the record is really pointing at. So I won't be offended if you decide to close this PR without merging!
Yeah I think I'll keep this as-is so that there's a link through to the full user profile. It would be great if the Django autocomplete field included these links!
Currently the
owned_by
field lists a user primary key:Changing this requires the admin user to click the magnifying glass, at which point a new popup opens which allows them to search for users.
In contrast, this PR changes the field to be defined via
ModelAdmin.autocomplete_fields
so it's a bit easier to change:That said, I'm now realizing that one downside of this approach is that there's no way to get more information about the selected user. With the other approach, clicking on "varma" takes you to the Django change view for that user, so that if you have any doubts, it's easy to see who the record is really pointing at. So I won't be offended if you decide to close this PR without merging!