I am trying to do this:
UserLog.objects.filter(user=user).filter(action=\'message\').filter(timestamp__lt=now)[0:5].update(read=True)
but I
If you want to slice out some of the results of a queryset, you can copy it it to another variable (a shallow copy is enough, which is faster than a deep copy because it just uses references to the original objects.)
import copy
queryset = Mytable.objects.all()
pieceOfQuery = copy.copy(queryset)
pieceOfQuery = pieceOfQuery[:10]
This will keep Django from complaining if you have an order_by filter on your table, since that happens after the slicing if you do it on the main queryset object