Browse Source

Adaptação para atender a alteração introduzida no Django 1.2.4 descrita em https://www.djangoproject.com/weblog/2010/dec/22/security/ item 'Information leakage in Django administrative interface'

stable/1.0
Sesostris Vieira 12 years ago
parent
commit
091fbf4de6
  1. 4
      sigi/apps/servidores/admin.py

4
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)

Loading…
Cancel
Save