+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
import csv
import json
raise AttributeError(name)
-class ContactAdmin(admin.ModelAdmin):
- __metaclass__ = ContactAdminMeta
+class ContactAdmin(admin.ModelAdmin, metaclass=ContactAdminMeta):
date_hierarchy = 'created_at'
list_display = ['created_at', 'contact', 'form_tag'] + \
["admin_list_%d" % i for i in range(admin_list_width)]
else:
# Create readonly fields from the body JSON.
attachments = list(instance.attachment_set.all())
- body_keys = body.keys() + [a.tag for a in attachments]
+ body_keys = list(body.keys()) + [a.tag for a in attachments]
# Find the original form.
try: