Am 19.03.2006 um 08:12 schrieb Max Battcher:
> Russell Keith-Magee wrote:
>> You still need to parse kwargs to handle queries across joins (e.g.,
>> Article.objects.filter(author__name__exact='fred'))
>
> Just playing around with ideas, but what if you could do something  
> like:
>
> Article.objects.filter(author=Author.objects.filter(name='fred'))

Fairly ugly, that :-P

Has something like the following syntax been discussed here before?

   Article.objects.filter(Article.author.name == 'fred')
   Article.objects.filter(Article.author.name.contains('fred'))
   etc

(overloading operators of the field descriptors to make this work)

Cheers,
Chris
--
Christopher Lenz
   cmlenz at gmx.de
   http://www.cmlenz.net/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to