Getting related objects

2009-06-24 Thread Daniele Procida
I have an application, with a model called Entities. I have another, with a model called NewsItem: class NewsItem(models.Model): destined_for = models.ManyToManyField( Entity, ) I can get a list of NewsItems for a particular Entity with something like: Entity.objects.al

Re: convenient method of getting related objects with the database API?

2008-08-26 Thread Karen Tracey
On Tue, Aug 26, 2008 at 4:41 PM, Andrew D. Ball <[EMAIL PROTECTED]>wrote: > > Is there a convenient way to get all objects related to > a given model instance? I want to check for objects > that would be deleted with a cascading delete before > actually performing a deletion. > The admin does th

convenient method of getting related objects with the database API?

2008-08-26 Thread Andrew D. Ball
Is there a convenient way to get all objects related to a given model instance? I want to check for objects that would be deleted with a cascading delete before actually performing a deletion. Peace, Andrew -- === Andrew D. Ball [EMAIL PROTECTED] Software Enginee