diff --git a/letters/admin.py b/letters/admin.py index f1356df..b827bda 100644 --- a/letters/admin.py +++ b/letters/admin.py @@ -114,7 +114,7 @@ class MiscDocumentAdmin(DocumentAdmin): class PlaceAdmin(gisAdmin.OSMGeoAdmin): # show Save and Delete buttons at the top of the page as well as at the bottom - save_on_top=True + save_on_top = True fields = ['id', 'name', 'state', 'country', 'point', 'notes'] readonly_fields = ['id'] default_lon = -8635591.130572217 diff --git a/letters/admin_filters.py b/letters/admin_filters.py index b89132b..652906b 100644 --- a/letters/admin_filters.py +++ b/letters/admin_filters.py @@ -23,8 +23,7 @@ def get_objects_with_date(model): def get_source_lookups(): - sources = set([doc_source for doc_source in DocumentSource.objects.all()]) - return [(source.id, source.name) for source in sources] + return DocumentSource.objects.values_list('id', 'name') # Get all Correspondents associated with a particular DocumentSource