from django.contrib import admin from .models import FabriRoll, FabricBatch from import_export.admin import ImportExportModelAdmin # Register FabriRoll class FabriRollAdmin(ImportExportModelAdmin): list_display = ('name', 'GRN', 'sWarp', 'sWeft', 'rLength', 'created_at', 'updated_at') search_fields = ('name', 'GRN__GRN') class FabricBatchAdmin(ImportExportModelAdmin): list_display = ('GRN', 'supplierName', 'buyer', 'quantity', 'created_at', 'updated_at') search_fields = ('GRN', 'supplierName', 'buyer', 'quantity') admin.site.register(FabriRoll, FabriRollAdmin) admin.site.register(FabricBatch, FabricBatchAdmin)