From 091fbf4de6c4071391bcccc8bfd044fcb2294c2c Mon Sep 17 00:00:00 2001 From: Sesostris Vieira Date: Tue, 23 Oct 2012 15:07:59 +0000 Subject: [PATCH] =?UTF-8?q?Adapta=C3=A7=C3=A3o=20para=20atender=20a=20alte?= =?UTF-8?q?ra=C3=A7=C3=A3o=20introduzida=20no=20Django=201.2.4=20descrita?= =?UTF-8?q?=20em=20=20https://www.djangoproject.com/weblog/2010/dec/22/sec?= =?UTF-8?q?urity/=20item=20'Information=20leakage=20in=20Django=20administ?= =?UTF-8?q?rative=20interface'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/servidores/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sigi/apps/servidores/admin.py b/sigi/apps/servidores/admin.py index dd5e130..0b9f201 100644 --- a/sigi/apps/servidores/admin.py +++ b/sigi/apps/servidores/admin.py @@ -80,6 +80,10 @@ class ServidorAdmin(admin.ModelAdmin): }), ) + def lookup_allowed(self, lookup, value): + return super(ServidorAdmin, self).lookup_allowed(lookup, value) or \ + lookup in ['user__is_active__exact'] + def formfield_for_dbfield(self, db_field, **kwargs): if db_field.name == 'foto': request = kwargs.pop("request", None)