"""
The exclude() option in its current form is unworkable on multi-valued
relations. I'd like to repeat that for emphasis: exclude() can *never*
obsolete direct negative lookups for multi-value relations.
"""
I do see a problem here: the equality ~Q(a=1) <-> Q(a__lt=1)|Q(a__gt=1) is
not correct
Opps! ...
> ).extra(where=['`data_school`.`site_name` != RAE']
should be
).extra(where=['`data_school`.`site_name` != %s'], params=['RAE']
which is case-in-point for why helping me avoid extra() is a good
thing!
~Adam sM
--
You received this message because you are subscribed to the
On Oct 27, 6:26 am, Kääriäinen Anssi wrote:
>
> Adam Moore wrote:
> > It's also worth noting that Q() objects permit the unary negation
> > operator, but this also yields the undesired results of the exclude()
> > call:
> > Blog.objects.filter(~Q(entry__author_count=2),
Hi,
On 27 October 2011 22:47, momo2k wrote:
> Hello,
>
> I posted this question some time ago on django-users, but since nobody
> answered and I think about this as a serious problem, I'll post here:
>
> Is there a reason why AdminMailHandler does not use
>
Hello,
I posted this question some time ago on django-users, but since nobody
answered and I think about this as a serious problem, I'll post here:
Is there a reason why AdminMailHandler does not use
record.getMessage() as all other formatters do? (e.g. logging/
__init__.py:436 Python 2.6).
Quote:
"""
It's also worth noting that Q() objects permit the unary negation
operator, but this also yields the undesired results of the exclude()
call:
Blog.objects.filter(~Q(entry__author_count=2),
entry__tag__name='django')
"""
As far as I understand, this is exactly the query you want. The
Greetings! Thanks to everyone for Django!
Long story short, I believe certain queries that are straightforward
and easy in plain SQL are not directly achievable in Django at all.
Obviously, Django is flexible enough that there is a workaround - but
a workaround shouldn't be necessary in a