from django.utils.safestring import mark_safe
-class ContactAdminMeta(admin.ModelAdmin.__metaclass__):
+class ContactAdminMeta(admin.ModelAdmin.__class__):
def __getattr__(cls, name):
if name.startswith('admin_list_'):
return lambda self: ""
["admin_list_%d" % i for i in range(admin_list_width)]
fields = ['form_tag', 'created_at', 'contact', 'ip']
readonly_fields = ['form_tag', 'created_at', 'contact', 'ip']
+ list_filter = ['form_tag']
def admin_list(self, obj, nr):
try:
except BaseException, e:
return ''
else:
- return obj.body.get(field_name, 'y')
+ return obj.body.get(field_name, '')
def __getattr__(self, name):
if name.startswith('admin_list_'):