Posted By

tclancy on 10/09/10


Tagged


Versions (?)

Django: Select Non-Empty Fields


 / Published in: Python
 

I always forget you need to use exclude()

  1. Profile.objects.filter(user__groups__isnull=True, on_homepage=False).exclude(about__exact='').order_by('?')[:settings.PROFILES_ON_HOMEPAGE]

Report this snippet  

You need to login to post a comment.