From 7bfb0676232fc1fac5432a057b85da21c42b9927 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 23 Sep 2021 19:13:35 +0530 Subject: [PATCH] Add admin search fields --- app/admin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/admin.py b/app/admin.py index 4efbd1a..8b1662a 100644 --- a/app/admin.py +++ b/app/admin.py @@ -1,8 +1,13 @@ from django.contrib import admin from .models import * + +class PersonAdmin(admin.ModelAdmin): + search_fields = ['title', 'first_name', 'last_name', 'organisation', 'position', 'country', 'contact_email'] + + # Register your models here. -admin.site.register(Person) +admin.site.register(Person, PersonAdmin) admin.site.register(Resource) admin.site.register(Range) admin.site.register(Method)