Thanks! That worked like a charm.

-Francis

---
Francis Gulotta
wiz...@roborooter.com


On Tue, Apr 20, 2010 at 10:06 AM, Tom Evans <tevans...@googlemail.com>wrote:

> On Tue, Apr 20, 2010 at 3:01 PM, wizard <wiz...@roborooter.com> wrote:
> > I'm not sure if this is a bug or an example of not understanding the
> > documentation.
> >
> > I have two models in two different databases. I have a router. I'm
> > trying to get a list of customers from one model (about 30 records
> > worth) and filter for records with that customer in the the other.
> >
> > Here are my models, router and view
> > http://dpaste.com/hold/185738/
> >
> > The view for reference.
> > def index(request):
> >    customers =  Edi856CtlRef.objects.values_list('customer', flat =
> > True)
> >    orders = Order.objects.all()
> >    #later on
> >    orders = orders.filter(customer__in = customers)
>
>        orders = orders.filter(custom__in = list(customers))
>
> > My questions are:
> > How do I stop this attempted join?
>
> See above.
>
> > and
> > Wouldn't the orm use the router to stop this?
> >
>
> Not yet :/
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to