Sorry about the confused question, not sure how to describe it properly.
Say that I have a model named
read = models.BooleanField(default=False)
news = News.object.filter(read=False) # get un-read news correctly
news.update(read=True) # update stored news successfully, but news will become empty
return news # return empty news instead of original filter result
Because querysets are lazy. The results aren't evaluated until you actually iterate through the queryset, which in your code presumably happens in the template.
You could convert to a list first:
news_to_read = list(news) news.update(read=True) return news_to_read
but be careful if you're using pagination, you're now evaluating the whole set of unread items rather than just one page worth.