From a8592631a7d1a9cf2e009e3b84d22ed6d2000b3f Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 25 Apr 2022 22:32:09 -0400 Subject: [PATCH] Minor changes to admin --- letters/admin.py | 2 +- letters/admin_filters.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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