Re: Convert a list to queryset and override the one in modelAdmin

2011-02-21 Thread Vinicius Massuchetto
2011/2/21 Vinicius Massuchetto : > 2011/2/21 Daniel Roseman : >> On Monday, February 21, 2011 5:47:42 PM UTC, Vinicius Massuchetto wrote: > >> You can't "convert" a list to queryset, as a queryset is - as the name >> implies - a database query. > > I im

Re: Convert a list to queryset and override the one in modelAdmin

2011-02-21 Thread Vinicius Massuchetto
2011/2/21 Daniel Roseman : > On Monday, February 21, 2011 5:47:42 PM UTC, Vinicius Massuchetto wrote: > You can't "convert" a list to queryset, as a queryset is - as the name > implies - a database query. I imagined that. =/ > What you could do is get all the IDs

Re: Convert a list to queryset and override the one in modelAdmin

2011-02-21 Thread Daniel Roseman
in change list. > > I'm currently declaring a queryset() method in modelAdmin, and > building this list there, but it fails to a "database error" admin > screen if I return the list. > > Is there something I can use to convert it? > > Thanks. > -- >

Convert a list to queryset and override the one in modelAdmin

2011-02-21 Thread Vinicius Massuchetto
Hi. I know that's not exactly the proper way of building a queryset, but I managed to build a list of objects of a model across operations and annotations, and I want to show that an admin change list. I'm currently declaring a queryset() method in modelAdmin, and building this list there, but it

Re: list to queryset

2009-04-14 Thread snorkel
Thanks a lot, This works fine and is much nicer I have been floundering around for what seems like weeks trying to figure out how you're supposed to this snorkel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: list to queryset

2009-04-14 Thread Alex Gaynor
On Tue, Apr 14, 2009 at 9:03 AM, snorkel wrote: > > I am new to Django and this is driving me crazy... excuse my > inexperience > anyway > > I have 3 classes > class Job(): > . some stuff . > > class Sequence() >... more stuff ... >job=models.ForeignKey('Job') >element_typ

list to queryset

2009-04-14 Thread snorkel
I am new to Django and this is driving me crazy... excuse my inexperience anyway I have 3 classes class Job(): . some stuff . class Sequence() ... more stuff ... job=models.ForeignKey('Job') element_type=models.ManyToMany('ElementType') class ElementType() ... some c