From 3f6a89f199635580ebc7b6bea30cd8bdc6fc068b Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Fri, 17 Nov 2017 16:47:18 +0100 Subject: [PATCH] search in confirmation and contact admins --- contact/admin.py | 1 + wtem/admin.py | 1 + 2 files changed, 2 insertions(+) diff --git a/contact/admin.py b/contact/admin.py index 22d3593..437ad97 100644 --- a/contact/admin.py +++ b/contact/admin.py @@ -28,6 +28,7 @@ class ContactAdmin(admin.ModelAdmin): fields = ['form_tag', 'created_at', 'contact', 'ip'] readonly_fields = ['form_tag', 'created_at', 'contact', 'ip'] list_filter = ['form_tag'] + search_fields = ['contact', 'body'] @staticmethod def admin_list(obj, nr): diff --git a/wtem/admin.py b/wtem/admin.py index efaf253..acab816 100644 --- a/wtem/admin.py +++ b/wtem/admin.py @@ -244,6 +244,7 @@ class ConfirmationAdmin(admin.ModelAdmin): readonly_fields = ('contact', 'readable_contact', 'readable_age', 'school_phone', 'key', 'confirmed') list_filter = ('confirmed',) list_select_related = ('contact',) + search_fields = ('last_name', 'email', 'contact__contact') def resend_mail(self, request, queryset): for confirmation in queryset: -- 2.20.1