Something like this should do the trick...

Events.objects.filter(brags__isnull=False)

On Apr 4, 8:01 pm, Kevin Monceaux <[EMAIL PROTECTED]> wrote:
> Django Fans,
>
> I've tinkered around briefly off and on with Django for a while now.
> Finally a few days ago I finally found one of those "Round Tuits" I've
> been looking for and started converting one of the web sites I act as
> webmaster for from PHP to Django.  My goal at this point is just to
> convert the existing functionality of the site to Django.  Once that's
> done and I get rid of PHP, I'll start adding additional functionality.
> In what's amounted to about a couple of afternoons' worth of coding I have
> everything except one section Djangoized.  Not bad considering I'm still
> basically a newbie and am learning the framework as I go.  My hat's off to
> everyone involved with Django for a wonderful framework!!!!
>
> The one bit I have left to go is our "Brags" section.  Currently, it looks
> like:
>
> http://www.WacoAgilityGroup.org/Brags
>
> I already have Event and Brag models set up.  An event can have zero or
> more brags associated with it.  In Django, how would one create a QuerySet
> of events which only contains events that have at least one brag
> associated with them?  In other words, I want to omit all events that have
> no brags.
>
> Kevinhttp://www.RawFedDogs.nethttp://www.WacoAgilityGroup.org
> Bruceville, TX
>
> Si hoc legere scis nimium eruditionis habes.
> Longum iter est per praecepta, breve et efficax per exempla!!!s
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to