Translating thematic track names in the CopyCamp registration form
[prawokultury.git] / contact / admin.py
index 5ddf831..ee1623d 100644 (file)
@@ -7,7 +7,7 @@ from django.template import Template
 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: ""
@@ -21,6 +21,7 @@ class ContactAdmin(admin.ModelAdmin):
         ["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:
@@ -28,7 +29,7 @@ class ContactAdmin(admin.ModelAdmin):
         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_'):