Can I combine the use of filter() and get() on querysets to return an object in a django view? I have the following view;
def my_view(request, city, store, item):
item = Item.objects.filter(store__city=city, city=city).get(item=item)
Items are all unique for city and store. I am currently trying to filter a queryset based on the two ForeignKey fields and then use get on a CharField but am getting an error message that the object does not exist. Am I approaching this incorrectly or is my syntax off somewhere? Thanks