What is the recommended idiom for checking whether a query returned any results? Example:
orgs = Organisation.objects.filter(name__iexact = \'Fjuk inc\')
Since version 1.2, Django has QuerySet.exists() method which is the most efficient:
if orgs.exists(): # Do this... else: # Do that...
But if you are going to evaluate QuerySet anyway it's better to use:
if orgs: ...
For more information read QuerySet.exists() documentation.