From 954348192bdc367b873a49c9e477f569ce5f5a87 Mon Sep 17 00:00:00 2001 From: Yingtong Li Date: Sun, 17 Mar 2019 23:23:47 +1100 Subject: [PATCH] Make members searchable in admin --- ssmembership/admin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ssmembership/admin.py b/ssmembership/admin.py index 63f1b95..83efa9b 100644 --- a/ssmembership/admin.py +++ b/ssmembership/admin.py @@ -18,4 +18,7 @@ from django.contrib import admin from . import models -admin.site.register(models.Member) +class MemberAdmin(admin.ModelAdmin): + search_fields = ['email', 'first_name', 'last_name', 'student_id'] + +admin.site.register(models.Member, MemberAdmin)