I have filters for year_record, age_category, and malnutrition_category. I want the default data shown in my Django admin UI list to correspond to the first value in each filter list. Additional data should only appear when filters are applied or when searching
class ProvincialLevelAdmin(ImportExportModelAdmin):
resource_classes = [ProvincialLevelResource]
list_display = (
'id',
'province_name',
'percentage',
'forcast_accuracy',
'malnutrition_category',
'year_record',
'age_category',
'level_category',
'provincial_level_coordinate',
'prevalence_category',
)
list_filter = ('year_record', 'age_category',,'malnutrition_category')
search_fields = ('province_name',)
list_per_page = 25
actions = [duplicate_model]
My goal is to limit the default data shown in my list because I have a large dataset, and it becomes slow when I am in the ProvincialLevelAdmin list