thanks ,helpful
On 1月11日, 上午10时38分, Eugene Wee wrote:
> Hi,
>
> On Wed, Jan 11, 2012 at 10:27 AM, Yekui Wen wrote:
> > can you guys tell me what is the Q method for ?
>
> Yes, though they are Q objects, not methods. Refer
>
thanks!
2012/1/11 Eugene Wee
> Hi,
>
> On Wed, Jan 11, 2012 at 10:27 AM, Yekui Wen wrote:
> > can you guys tell me what is the Q method for ?
>
> Yes, though they are Q objects, not methods. Refer to:
>
>
Hi,
On Wed, Jan 11, 2012 at 10:27 AM, Yekui Wen wrote:
> can you guys tell me what is the Q method for ?
Yes, though they are Q objects, not methods. Refer to:
https://docs.djangoproject.com/en/1.3/topics/db/queries/#complex-lookups-with-q-objects
Regards,
Eugene
--
You
hey guys, I need your help
can you guys tell me what is the Q method for ?
--
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
http://docs.djangoproject.com/en/dev/topics/settings/#designating-the-settings
On Mon, Nov 10, 2008 at 07:13, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> >>> from django.db.models import Q
>
> Traceback (most recent call last):
> File "", line 1, in
> File
>>> from django.db.models import Q
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.5/site-packages/django/db/__init__.py", line
9, in
if not settings.DATABASE_ENGINE:
File "/usr/lib/python2.5/site-packages/django/conf/__init__.py",
line 28, in
On Wed, 2008-01-02 at 14:25 -0800, Peter wrote:
> I am trying to filter by users who are not staff, but this user column
> accepts NULL values in my model.
>
> As a result I need to check for user__isnull, since
> user__is_staff=False will not work for null values.
>
> I tried:
>
I am trying to filter by users who are not staff, but this user column
accepts NULL values in my model.
As a result I need to check for user__isnull, since
user__is_staff=False will not work for null values.
I tried:
Post.objects.filter(Q(user__isnull=True) | Q(user__is_staff=False))
but this
8 matches
Mail list logo