How to get another fields of related model inside
ModelAdmin panels List? Tried this:
'user__first_name', doesn't work. It seems that its not possible out of the box, but maybe have some one already done this? There are my models,
User is just regular django.auth User model and it has
first_name by default.
# models.py class Customer(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='customers') org_title = models.CharField(max_length=500, default='', blank=True) # wagtail_hooks.py class CustomerAdmin(ModelAdmin): model = Customer menu_label = 'Customer' menu_icon = 'pilcrow' menu_order = 200 add_to_settings_menu = False exclude_from_explorer = False list_display = ('user', 'org_title') list_filter = ('user', 'org_title') search_fields = ('user', 'org_title') panels = [ FieldPanel('user__first_name'), FieldPanel('org_title') ]