X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/e84e5e33adfb442610d8f64d794a9f7d170b806e..1457eb9323363108979b3cae92b7503582df0138:/contact/admin.py diff --git a/contact/admin.py b/contact/admin.py index 3fd337f..ee1623d 100644 --- a/contact/admin.py +++ b/contact/admin.py @@ -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: