m/group/django-users/browse_thread/thread/9be1
> >> ...
>
> >> There's a lot of cruft in that thread, the basic idea is using
> >> cursor.execute() to do your subqueries (selecting all living authors
> >> per book), and then using pure python to attach those subqu
ython to attach those subqueries to
>> your larger book queryset. It's not as painful as it sounds.
>>
>> Lastly, there are rumors of aggregation support coming soon/already
>> here, but I'm not sure how that works (or even if it will solve these
>> kinds of problems)
f problems) so will say no more...
>
> E
>
>
>
> > On Aug 26, 2:10 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> >> On Aug 25, 2008, at 3:11 PM,MrJogowrote:
>
> >>> How do I create a custom manager for many-to-many traversal? An
> >>&
ll solve these
kinds of problems) so will say no more...
E
>
>
> On Aug 26, 2:10 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>> On Aug 25, 2008, at 3:11 PM,MrJogowrote:
>>
>>
>>
>>
>>
>>> How do I create a custom manager for many-to
many levels (ie, only
books with living authors AND only the related living authors) with
one command/db hit.
On Aug 26, 2:10 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> On Aug 25, 2008, at 3:11 PM,MrJogowrote:
>
>
>
>
>
> > How do I create a custom man
On Aug 25, 2008, at 3:11 PM, MrJogo wrote:
>
> How do I create a custom manager for many-to-many traversal? An
> example will illustrate what I want to do better. Suppose I have the
> following models.py:
>
> class Book(models.Model):
> title = models.CharField(max_length=
gt; On Aug 25, 12:11 am,MrJogo<[EMAIL PROTECTED]> wrote:
>
> > How do I create a custom manager for many-to-many traversal? An
> > example will illustrate what I want to do better. Suppose I have the
> > following models.py:
>
> > class Book(models.Model):
&
o I create a custom manager for many-to-many traversal? An
> example will illustrate what I want to do better. Suppose I have the
> following models.py:
>
> class Book(models.Model):
> title = models.CharField(max_length=100)
>
> class Author(models.Model):
> books = models.F
How do I create a custom manager for many-to-many traversal? An
example will illustrate what I want to do better. Suppose I have the
following models.py:
class Book(models.Model):
title = models.CharField(max_length=100)
class Author(models.Model):
books = models.ForeignKey(Book)
name
9 matches
Mail list logo