Re: checking for empty result in queryset

2009-09-15 Thread Carlos Leite
Just use ... if data: if data is empty, its not True for python... On Tue, Sep 15, 2009 at 2:48 PM, Gonzillaaa wrote: > > in the following query: > data = Model.objects.filter(node_id=id) > > how do I check if data is empty before rendering or being redirected > to a 404? > > G. > > > > >

checking for empty result in queryset

2009-09-15 Thread Gonzillaaa
in the following query: data = Model.objects.filter(node_id=id) how do I check if data is empty before rendering or being redirected to a 404? G. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou