hi list,
I'm willing to implement something exactly like what's described here
let's say I have documents and keywords, join by a many to many
relation
when I display a document detail, I wish to also display other
documents that have a maximum of common keyword.
detailed use case here
i believe you can do this with "extra" attribute.
go to http://docs.djangoproject.com/en/1.3/ref/models/querysets/ and
search for subquery. you'll see how to do subqueries.
On Apr 6, 5:30 pm, bernatbonet wrote:
> Data Model:
> class A(models.model):
> desc: mod
Data Model:
class A(models.model):
desc: model.CharField()
class B(models.model):
a: model.ForeignKey('A')
desc: models.CharField()
I need to do this select in a view:
select max(num_a) as max_num_a from (select a, count(desc) as
num_a
from B group by a) as x;
I've tried this:
result
On 16 kesä, 21:41, rt wrote:
> Hi,
>
> I am having a hard time with Q objects based on subqueries. It's a
> part of a linguistic corpus analysis query builder (hence Q objects as
> this is how I parse and translate arbitrary queries into Django) --
> the user can s
Hi,
I am having a hard time with Q objects based on subqueries. It's a
part of a linguistic corpus analysis query builder (hence Q objects as
this is how I parse and translate arbitrary queries into Django) --
the user can search 'posts' that meet complex criteria. Anyway, it
Hi,
I'ts my first post here, so "Hello" Everyone :)
I've got the code as shown below. The problem is that when I do a
subquery using a previously generated queryset it doesn't return any
results, if the queryset contained a geometry field (r1 here)
>>> b="49.98544839116778,19.8248291015625,50.1439
thank you sir i found the solution
--
View this message in context:
http://old.nabble.com/How-to-use-subqueries-in-django-tp26387486p26408019.html
Sent from the django-users mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google Groups
On Wed, Nov 18, 2009 at 2:15 AM, Radhikavk wrote:
>
> in one query they have giver or conditions
> but i need
> i wil have one common query like
> list=rooms.objects.all() # this is common query i m using
>
> and if the condition given like room status,type etc then i need to append
> those wher
where room_type=this
else
nothing
i have so many search criteria , i think this appending is useful but it is
giving error queryset has no attribute append
--
View this message in context:
http://old.nabble.com/How-to-use-subqueries-in-django-tp26387486p26402998.html
Sent from the django
On Nov 17, 2009, at 7:49 AM, Radhikavk wrote:
>
> hi,
>
> how to use search criteria using OR and AND in queries
> user can search room by no,room_type, block etc i need the combination
>
>
> Please can you refer the tutorial
http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lo
hi,
how to use search criteria using OR and AND in queries
user can search room by no,room_type, block etc i need the combination
Please can you refer the tutorial
--
View this message in context:
http://old.nabble.com/How-to-use-subqueries-in-django-tp26387486p26390239.html
Sent from the
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 o
ok i got it
Thanks
--
View this message in context:
http://old.nabble.com/How-to-use-subqueries-in-django-tp26387486p26389937.html
Sent from the django-users mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google Groups
"Django
On Tue, Nov 17, 2009 at 6:43 AM, Radhikavk wrote:
>
> I tried this i dis not get solution
>
> i m getting a list from rooms table
>
> room_list=rooms.objects.all()
>
> This will give me the room type id when i print room_list.room_type_id but
> for this id i need a name which is in room_types tab
:
http://old.nabble.com/How-to-use-subqueries-in-django-tp26387486p26388551.html
Sent from the django-users mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
and to display the list of rooms the quesry should be
>
> select r.room_type_id,r.room_no,rt.room_type_name from room_types rt,rooms r
> where rt.room_type_id=r.room_type_id
>
> How to give this query in django
>
> Thanks in advance
>
> --
> View this message in
> cont
to give this query in django
Thanks in advance
--
View this message in context:
http://old.nabble.com/How-to-use-subqueries-in-django-tp26387486p26387486.html
Sent from the django-users mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google
On Sat, 2007-02-10 at 09:41 -0600, Tim Chase wrote:
> For an app I've been assembling, I need to filter a particular
> data-set based on multiple many-to-many criteria where the
> criteria span multiple records in the far participant of the M2M.
> The basics are the recordset (Items) and each Ite
For an app I've been assembling, I need to filter a particular
data-set based on multiple many-to-many criteria where the
criteria span multiple records in the far participant of the M2M.
The basics are the recordset (Items) and each Item has a M2M
relationship with Properties (a key/value pair)
19 matches
Mail list logo