class ProductAdmin(ExportMixin, admin.ModelAdmin):
(중략)
def delete_queryset(self, request, queryset):
"""상품 상태별 삭제 설정 변경"""
for obj in queryset:
if obj.product_status_id < 6:
obj.soft_delete()
else:
obj.delete()
def get_queryset(self, obj):
qs = super(ProductAdmin, self).get_queryset(obj)
return qs.exclude(is_deleted=True)