Thank you for the response. I feared the answered would be no but I wanted to be sure.
Sent from my iPhone On Apr 9, 2014, at 12:27 AM, Anssi Kääriäinen <[email protected]> wrote: > No, there is no way to do what you want. All filters are implemented as > filters in the DB, Django doesn't know how to execute them in Python. There > was some effort to implement filters also in Python, but there hasn't been > any activity on this recently. > > The only way to do this currently is to implement the filtering logic in > Python yourself. > > - Anssi > > On Wednesday, April 9, 2014 8:33:16 AM UTC+3, Jill Green wrote: >> >> I apologize if this question has already been asked and answered. I want to >> know if it's possible to filter out query sets without doing lazy queries or >> hitting the database again. Basically I have this query: >> >> qs= self.filter(a months worth of data) >> >> Now if I evaluate this query by doing this: >> >> if qs: >> qs=qs.filter(a weeks worth of data inside that month) >> >> Why does the second filter not just search the objects inside that first >> queryset? And is there a way to do just that? Essentially I'm trying to >> avoid hitting the database again. >> I'm using Django 1.3.4 with MySQL if that matters. >> >> Thanks in advance for any replies. >> >> JG >> >> Sent from my iPhone > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/d6836bf3-39f4-41bf-a5c5-bd6ffb63ca52%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/E68D3729-54FA-4A1F-B7FC-4E799597D45B%40gmail.com. For more options, visit https://groups.google.com/d/optout.

