Heyas
I'd like to be able to search user profiles by username in the django admin. Essentially, in admin.py, I'd be doing something like:
class UserProfileAdmin(admin.ModelAdmin):
search_fields = ['username']
but this wont work since user
is a foreign key in the my usual user profile set up.
Is there a quick way to achieve this without having to add a username
field to my UserProfile model?
Thanks