Re: PseudoField / Field-level query managers

2009-04-09 Thread Malcolm Tredinnick
On Thu, 2009-04-09 at 12:46 -0400, Steve wrote: > Hello Djeople, > > Trolling for criticism, broader use-cases, or a lurking solution for > my latest problem: Say you've got a model with two fields > 'primary_lang' and 'secondary_lang' and you'd like to filter across > them in one fell swoop. The

Re: PseudoField / Field-level query managers

2009-04-09 Thread Alex Gaynor
On Thu, Apr 9, 2009 at 6:22 PM, Stephen wrote: > > Excellent, I'll be on the lookout for the discussion. For the sake of > history here's my hack-around: > > http://www.djangosnippets.org/snippets/1423/ > > Essentially just a sub-class of ModelManager with an additional > convention of looking fo

Re: PseudoField / Field-level query managers

2009-04-09 Thread Stephen
Excellent, I'll be on the lookout for the discussion. For the sake of history here's my hack-around: http://www.djangosnippets.org/snippets/1423/ Essentially just a sub-class of ModelManager with an additional convention of looking for foo_filter() methods in the event it hits a FieldError while

Re: PseudoField / Field-level query managers

2009-04-09 Thread Alex Gaynor
On Thu, Apr 9, 2009 at 12:46 PM, Steve wrote: > Hello Djeople, > > Trolling for criticism, broader use-cases, or a lurking solution for my > latest problem: Say you've got a model with two fields 'primary_lang' and > 'secondary_lang' and you'd like to filter across them in one fell swoop. The > o

PseudoField / Field-level query managers

2009-04-09 Thread Steve
Hello Djeople, Trolling for criticism, broader use-cases, or a lurking solution for my latest problem: Say you've got a model with two fields 'primary_lang' and 'secondary_lang' and you'd like to filter across them in one fell swoop. The obvious solution is to make a manager method filterlang('foo