From d6dd3d6fbdfe4bb616980ad44474fe3a0efe7423 Mon Sep 17 00:00:00 2001 From: lvusyy Date: Thu, 21 Jul 2016 14:29:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9=20=E8=BF=87=E6=BB=A4=E5=99=A8=20=20?= =?UTF-8?q?=E4=BB=85=E6=98=BE=E7=A4=BA=20verbose=5Fname=20,=E4=B8=8D?= =?UTF-8?q?=E5=9C=A8=E7=8E=B0=E5=AE=9E=20=E5=8E=9F=E5=A7=8B=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当 过滤器 的对象 有引用关系 时候会显示原来的model名. 所以隐藏了. 不知道影响其它代码不. --- xadmin/plugins/filters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xadmin/plugins/filters.py b/xadmin/plugins/filters.py index 46a5903ec..28ecb7aca 100644 --- a/xadmin/plugins/filters.py +++ b/xadmin/plugins/filters.py @@ -120,8 +120,8 @@ def get_list_queryset(self, queryset): if len(field_parts)>1: # Add related model name to title - spec.title = "%s %s"%(field_parts[-2].name,spec.title) - + #spec.title = "%s %s"%(field_parts[-2].name,spec.title) + spec.title = "%s"%(spec.title) # Check if we need to use distinct() use_distinct = (use_distinct or lookup_needs_distinct(self.opts, field_path))