mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
调整个人数据更新时间显示时分秒
This commit is contained in:
@@ -287,7 +287,8 @@ class MySiteAdmin(admin.ModelAdmin): # instead of ModelAdmin
|
||||
def status_today(self, obj: MySite):
|
||||
is_update = obj.updated_at.date() == datetime.today().date()
|
||||
|
||||
return format_html('{}<img src="/static/admin/img/icon-{}.svg">', obj.updated_at.date(),
|
||||
return format_html('{}<img src="/static/admin/img/icon-{}.svg">',
|
||||
datetime.strftime(obj.updated_at, '%Y-%m-%d %H:%M:%S'),
|
||||
'yes' if is_update and obj.site.get_userinfo_support else 'no')
|
||||
|
||||
status_today.short_description = '更新时间'
|
||||
|
||||
Reference in New Issue
Block a user