From aa951cf153cf10b68d2c856691dda1d2b4f573f9 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Tue, 27 Sep 2022 14:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=A7=8D=E5=AD=90=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=B8=8A=E7=9A=84=E7=A7=8D=E5=AD=90=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pt_site/admin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pt_site/admin.py b/pt_site/admin.py index c0b11b8..0b5a4c8 100644 --- a/pt_site/admin.py +++ b/pt_site/admin.py @@ -711,7 +711,8 @@ class TorrentInfoAdmin(ImportExportModelAdmin, AjaxAdmin): # instead of ModelAd # 'updated_at' ) - # list_display_links = None + # list_display_links = ['name_href'] + def file_size(self, torrent_info: TorrentInfo): return FileSizeConvert.parse_2_file_size(torrent_info.size) @@ -735,7 +736,7 @@ class TorrentInfoAdmin(ImportExportModelAdmin, AjaxAdmin): # instead of ModelAd return format_html( # 下载种子 # '下载种子', - '下载种子', + '下载种子', obj.magnet_url ) @@ -743,8 +744,8 @@ class TorrentInfoAdmin(ImportExportModelAdmin, AjaxAdmin): # instead of ModelAd return format_html( # 下载种子 # '下载种子', - '{}', - obj.magnet_url, + '{}', + # obj.magnet_url, obj.name, obj.name[0:25] + ' ...' )