Hi,

On Tue, 2006-04-11 at 21:20 -0400, Max Battcher wrote:
> if sometag.article_set.count() == 0:
>     pass # your code here

This will test if one tag has an empty article_set. AFAICT, the question
is on how to find all tags which have an empty article_set. Yes, you
could do it this way, but it means querying the DB again for every tag.

> > Each Article can be associated with multiple Tags and vice versa.
> > How can I query the Tag model to obtain all Tags with no associated
> > articles?  (m-r)  I basically want to delete unused tags.

Unfortunately, it seems that you have to drop to SQL. See the thread
started by me on the subject yesterday,

http://groups.google.com/group/django-users/browse_thread/thread/e708abca0baf6a32/15ae0b421f607983

Russell


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to