Re: Getting all unique values of a field with Django ORM

2009-08-31 Thread stevedegrace
Thanks guys! On Aug 30, 10:56 pm, Alex Gaynor wrote: > On Sun, Aug 30, 2009 at 9:37 PM, stevedegrace wrote: > > > Hi guys, > > > I'm making a refback type linkback app for my hobby CMS. I want to > > find all the unique page targets. I am thinking

Re: Getting all unique values of a field with Django ORM

2009-08-30 Thread Alex Gaynor
On Sun, Aug 30, 2009 at 9:37 PM, stevedegrace wrote: > > Hi guys, > > I'm making a refback type linkback app for my hobby CMS. I want to > find all the unique page targets. I am thinking broadly of a couple of > ways to do it. One with the ORM sort of line this: > > targets =

Re: Getting all unique values of a field with Django ORM

2009-08-30 Thread Russell Keith-Magee
On Mon, Aug 31, 2009 at 9:37 AM, stevedegrace wrote: > > Hi guys, > > I'm making a refback type linkback app for my hobby CMS. I want to > find all the unique page targets. I am thinking broadly of a couple of > ways to do it. One with the ORM sort of line this: > > targets =

Getting all unique values of a field with Django ORM

2009-08-30 Thread stevedegrace
Hi guys, I'm making a refback type linkback app for my hobby CMS. I want to find all the unique page targets. I am thinking broadly of a couple of ways to do it. One with the ORM sort of line this: targets = list(set([linkback.target_url for linkback in LinkBacks.objects.all()])) This seems