In the Django Admin area, rather than have two separate columns for first_name
and last_name
to display, I'd like to concatenate those to create one column.
I want to avoid creating a separate model field to get this done.
One solution could be to return self
, but that seems to not work either.
The code below gets me "This site cannot be reached."
admin.py
from django.contrib import admin
from .models import Agent
class RealtorAdmin(admin.ModelAdmin):
list_display = ('MLS_number', 'first_name' + 'last_name', 'email', 'phone', 'hire_Date')