Convert created to created_at in log entry admin

This commit is contained in:
Erin 2024-04-15 15:48:23 -07:00
parent 6bce068e96
commit 49a107e027
No known key found for this signature in database
GPG key ID: 1CAD275313C62460

View file

@ -290,6 +290,13 @@ class CustomLogEntryAdmin(LogEntryAdmin):
# Return the field value without a link
return f"{obj.content_type} - {obj.object_repr}"
# We name the custom prop 'created_at' because linter
# is not allowing a short_description attr on it
# This gets around the linter limitation, for now.
@admin.display(description=_("Created at"))
def created(self, obj):
return obj.timestamp
search_help_text = "Search by resource, changes, or user."
change_form_template = "admin/change_form_no_submit.html"