from django.contrib import admin from .models import Products, Categories from import_export.admin import ExportActionMixin class ProductAdmin(ExportActionMixin, admin.ModelAdmin): list_display = ('name', 'score','link','category','terms') search_fields = ['name', 'score','link','category__name','terms'] # Register your models here. admin.site.register(Products,ProductAdmin) admin.site.register(Categories)