# Django 6-Filtering Objects

**URL:** https://forum.codewithmosh.com/t/django-6-filtering-objects/15079
**Category:** Django
**Created:** [September 11, 2022, 8:23pm UTC](https://forum.codewithmosh.com/t/django-6-filtering-objects/15079 "2022-09-11T20:23:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Trycos](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@Trycos](https://forum.codewithmosh.com/u/Trycos)
#### Post date: [September 11, 2022, 8:23pm UTC](https://forum.codewithmosh.com/t/django-6-filtering-objects/15079/1 "2022-09-11T20:23:17Z")

</div>

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: [http://127.0.0.1:8000/playground/hello/](http://127.0.0.1:8000/playground/hello/)

---

<div class="post-metadata">

### Author: ![tooTALLtim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/tootalltim/32/5469_2.png) [@tooTALLtim](https://forum.codewithmosh.com/u/tooTALLtim)
#### Post date: [January 22, 2023, 5:31pm UTC](https://forum.codewithmosh.com/t/django-6-filtering-objects/15079/2 "2023-01-22T17:31:03Z")

</div>

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

`from store.models import Product`
