Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
fix: Show full name in admin table
Browse files Browse the repository at this point in the history
  • Loading branch information
hepplerj committed May 13, 2024
1 parent 84956db commit 6860ac8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions postcards/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,13 @@ def view_received_objects(self, obj):
)
return format_html('<a href="{}">View recieved postal items</a>', url)

def get_full_name(self, obj):
return f"{obj.first_name} {obj.last_name}"

get_full_name.short_description = "Full Name"

list_display = (
"last_name",
"first_name",
"get_full_name",
"title",
"entity_type",
"view_sent_objects",
Expand Down

0 comments on commit 6860ac8

Please sign in to comment.