/ Published in: Python
I always forget you need to use exclude()
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Profile.objects.filter(user__groups__isnull=True, on_homepage=False).exclude(about__exact='').order_by('?')[:settings.PROFILES_ON_HOMEPAGE]