Run django management command for admin file
I want to run this management command but its not working for me ,
and getting this error AttributeError: type object ' ProductinfoAdmin' has no attribute 'objects'
from django.core.management.base import BaseCommand
from product.admin import ProductinfoAdmin
class Command(BaseCommand):
def handle(self, *args, **options):
moa = ProductinfoAdmin.objects.filter(list_display("info")).update(list_display=False)
print(f"The total number of activated Products {moa}")