Re: ORM Query question

2015-07-13 Thread Joss Ingram
t;>>> event pages, each event page can be tagged (using taggit), and I want to >>>>> produce a list of distinct tags used in the events that belong to that >>>>> event index on the index itself. I'm using the Django CMS Wagtail, but I >>>>> guess this i

Re: ORM Query question

2015-07-13 Thread Avraham Serour
;> In my models I have an event index page type, which can have child >>>> event pages, each event page can be tagged (using taggit), and I want to >>>> produce a list of distinct tags used in the events that belong to that >>>> event index on the index itse

Re: ORM Query question

2015-07-13 Thread Joss Ingram
> pages, each event page can be tagged (using taggit), and I want to produce >>> a list of distinct tags used in the events that belong to that event index >>> on the index itself. I'm using the Django CMS Wagtail, but I guess this is >>> really a Django ORM query

Re: ORM Query question

2015-07-13 Thread Avraham Serour
jango CMS Wagtail, but I guess this is >> really a Django ORM query question. I''ve got some code as part of my model >> which is working but I don't think it's the most efficient way of doing >> this. Still trying unlearn doing things with SQL and learn how the same >&g

Re: ORM Query question

2015-07-13 Thread Joss Ingram
want to produce > a list of distinct tags used in the events that belong to that event index > on the index itself. I'm using the Django CMS Wagtail, but I guess this is > really a Django ORM query question. I''ve got some code as part of my model > which is working but I don't think

ORM Query question

2015-07-10 Thread Joss Ingram
this is really a Django ORM query question. I''ve got some code as part of my model which is working but I don't think it's the most efficient way of doing this. Still trying unlearn doing things with SQL and learn how the same thing should be done in Django. My code as part of the event index

Re: ORM Query question

2010-04-12 Thread Tim Shaffer
Or, using range: MyModel.objects.filter( Q(a__range=(1,5)) | Q(b__range=(20,70)) ) -- 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

Re: ORM Query question

2010-04-12 Thread Tim Shaffer
http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects MyModel.objects.filter( ( Q(a__gt=1) & Q(a__lt=5) ) | ( Q(b__gt=20) & Q(b__lt=70) ) ) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: ORM Query question

2010-04-12 Thread rebus_
On 13 April 2010 01:09, zweb wrote: > how do i do this kind of condition in django orm filter: > > ( 1 < a < 5)  or ( 20 < b < 70) > > select * from table where (a between 1 and 5) or (b between 20 and 70) > > -- > You received this message because you are subscribed to

ORM Query question

2010-04-12 Thread zweb
how do i do this kind of condition in django orm filter: ( 1 < a < 5) or ( 20 < b < 70) select * from table where (a between 1 and 5) or (b between 20 and 70) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email