Re: Django query from database

2013-10-11 Thread Leonardo Giordani
Ok, I think I got the point. So, correct me if I didn't get it right, you have to get users which have first_name, last_name, or other fields equal to the words in your list B. This can be accomplished by looking at each field for each keyword. I would also compile a dictionary keeping reference

Re: Django query from database

2013-10-11 Thread Kamal Kaur
On Fri, Oct 11, 2013 at 6:43 PM, Leonardo Giordani wrote: > Sorry, I forgot the User part of your question. > > Let me understand the exact relationship between codes, words and users: do > those words or codes come from a form? Or are saved in the DB for each user? Actually I have to search for

Re: Django query from database

2013-10-11 Thread Leonardo Giordani
Sorry, I forgot the User part of your question. Let me understand the exact relationship between codes, words and users: do those words or codes come from a form? Or are saved in the DB for each user? I ask this because I want to understand if you are trying to get a relationship that already exi

Re: Django query from database

2013-10-11 Thread Kamal Kaur
On Fri, Oct 11, 2013 at 4:06 PM, Leonardo Giordani wrote: > I think that you have to perform a query for each Code, extracting the list > of Word matching that Code and then merging all the lists. Exactly! > Since I don't know your models, I'll give you some general code, let me know > if you un

Re: Django query from database

2013-10-11 Thread Leonardo Giordani
I think that you have to perform a query for each Code, extracting the list of Word matching that Code and then merging all the lists. Since I don't know your models, I'll give you some general code, let me know if you understand how to implement it exactly on your models. Assuming that the CodeTa