Django Admin: how to display fields from two different models in same view?

for displaying user email you need to have a method on UserProfile or UserProfileAdmin that returns the email

on UserProfile

def user_email(self):
    return self.user.email

or on UserProfileAdmin

def user_email(self, instance):
    return instance.user.email

then change your list_display to

list_display = ('name', 'gender', 'user_email')

Related docs: ModelAdmin.list_display

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)