Re: Getting "most"

2011-05-27 Thread bax...@gretschpages.com
And that works, with one exception: .get_object_for_this_type(pk=object['object_id']) Getting the objects IS a bit inefficient, but since I only need the top 10, I can live with it. On May 27, 12:32 pm, Jason Culverhouse wrote: > If you were to do something like this: > > from django.models impo

Re: Getting "most"

2011-05-27 Thread Jason Culverhouse
On May 27, 2011, at 9:58 AM, bax...@gretschpages.com wrote: > I have a "watch" model that lets users keep an eye on various things > through a generic relation: > > class Watch(models.Model): >subscriber = models.ForeignKey(User, verbose_name="Subscriber") >content_type = models.ForeignK

Getting "most"

2011-05-27 Thread bax...@gretschpages.com
I have a "watch" model that lets users keep an eye on various things through a generic relation: class Watch(models.Model): subscriber = models.ForeignKey(User, verbose_name="Subscriber") content_type = models.ForeignKey(ContentType) content_object = generic.GenericForeignKey() obj