Tuesday, October 30, 2012

Re: Joining querysets?

On Mon, Oct 29, 2012 at 9:46 PM, Lachlan Musicman <datakid@gmail.com> wrote:
> On Tue, Oct 30, 2012 at 1:35 PM, Lachlan Musicman <datakid@gmail.com> wrote:
>> Hola,
>>
>> So I've reached the point where I feel it necessary to join querysets.
>
>
> Don't bother with this - I just wrote a better Query to solve this issue
>
>
> L.
>
>
>>
>> All the ref's I've read online are quite old and recommend using | or
>> itertools.chain()
>>
>> Are these still the recommended method, or am I doing it wrong?

This depends on what you mean by "join" (just in case you need it
again in the future). If you mean concatenate, you might try '+'.

If you mean something fancier, you may find help in the Q and F
queryset operations documentation.

Bill

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

No comments:

Post a Comment