Jirka, That doesn't solve the problem. That will still do a very expensive count() operation on the queryset. In fact, examples.count() is what happens when you do bool(examples) anyway.
Thanks, Adam On Mon, Nov 28, 2011 at 8:11 PM, Jirka Vejrazka <jirka.vejra...@gmail.com>wrote: > Hi Adam, > > I tend to use: > > if examples.count(): > > ...something... > > HTH > > Jirka > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.