I have in my models and admin the following :
models.py
class Portal(models.Model):
customer = models.ForeignKey(Customer, on_delete=models.SET_NULL, blank=True, null=True)
#
@property
def get_customer(self):
return self.customer
admin.py
class PortalAdmin(admin.ModelAdmin):
list_display = ('name', 'get_customer',)
readonly_fields = ('get_customer',)
But GET CUSTOMER in the admin is always as dash (-)
My customer/models.py is alright :
def __str__(self):
return self.name