Django 6-Filtering Objects

I have here some issue with the Product.objects …

def say_hello(request):
queryset = Product.objects.filter(collection__id=1)
return render(request, ‘hello.html’, {‘name’: ‘Mosh’, ‘products’: list(queryset)})

I get the Error:
Unresolved attribute reference ‘objects’ for class ‘Product’.:6

It returns no list on:

1 Like

Are you importing Product in the view? Up top you should have:

from store.models import Product