Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
Your right... I can't testing now. 2013/10/9 Hélio Miranda > gives error: > 'BaseList' object has no attribute 'values' > > The query has to be the same as I stated it works: > * >

Re: Query parameters for receiving post

2013-10-09 Thread Hélio Miranda
gives error: 'BaseList' object has no attribute 'values' The query has to be the same as I stated it works: * Player.objects.filter(country__in=Country.objects.filter(nationality__in=Nationality.objects.filter(name='Espanhola'))) * -- You received this message because you are subscribed to the

Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
try this solution http://plnkr.co/edit/cyM6AmZcyFVUU6soFKhB 2013/10/9 Denis Chernoshchekov > ok, i understand, i minute. > > > 2013/10/9 Denis Chernoshchekov > >> *fld_name = 'nationality_in' *must be with double '_'* **fld_name = >>

Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
ok, i understand, i minute. 2013/10/9 Denis Chernoshchekov > *fld_name = 'nationality_in' *must be with double '_'* **fld_name = > 'nationality__in'* > > > 2013/10/9 Denis Chernoshchekov > >> Sorry, i don't understand you... You can

Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
*fld_name = 'nationality_in' *must be with double '_'* **fld_name = 'nationality__in'* 2013/10/9 Denis Chernoshchekov > Sorry, i don't understand you... You can control all your values for all > fields, you can generate dict which you like. > > > 2013/10/9 Hélio

Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
Sorry, i don't understand you... You can control all your values for all fields, you can generate dict which you like. 2013/10/9 Hélio Miranda > I put that work, I wanted to know was how to put in the code, because you > can not do the same to position > > -- > You received

Re: Query parameters for receiving post

2013-10-09 Thread Hélio Miranda
was trying something like this: *if fld_name == 'nationality':* *fld_name = 'nationality_in'* *value = Player.objects.filter(country__in=Country.objects.filter(nationality__in=Nationality.objects.filter(name=value))) * But it does not work -- You

Re: Query parameters for receiving post

2013-10-09 Thread Hélio Miranda
I put that work, I wanted to know was how to put in the code, because you can not do the same to position -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
Try this - *Player.objects.filter(country__in=** Nationality.objects.filter(name='Espanhola').distinct('country').values('country')) * 2013/10/9 Hélio Miranda > yes, that was it ... > Just one more thing, if I would like to create the nationality of the > player, so that

Re: Query parameters for receiving post

2013-10-09 Thread Hélio Miranda
yes, that was it ... Just one more thing, if I would like to create the nationality of the player, so that the filter is: * Player.objects.filter(country__in=Country.objects.filter(nationality__in=Nationality.objects.filter(name='Espanhola'))) * * * where only the step nationality, as I do, not

Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
See, maybe like this? http://plnkr.co/edit/cyM6AmZcyFVUU6soFKhB 2013/10/9 Hélio Miranda > I have code like this: > http://plnkr.co/edit/L1ByIyFyaEdgwrfVU7Jr > > Just do not know how to put this part in the code ... > Where do I put this part? > > -- > You received this

Re: Query parameters for receiving post

2013-10-09 Thread Hélio Miranda
I have code like this: http://plnkr.co/edit/L1ByIyFyaEdgwrfVU7Jr Just do not know how to put this part in the code ... Where do I put this part? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
For position you may have dict like - **{' position__in ': Position.objects. filter(name=positionpost) } 9 жовт. 2013 11:45, користувач "Hélio Miranda" написав: > hi, thanks that helped a lot. > But I have a problem which is, for example when I do a filter by position, > is

Re: Query parameters for receiving post

2013-10-09 Thread Hélio Miranda
hi, thanks that helped a lot. But I have a problem which is, for example when I do a filter by position, is not direct as other fields like name or surname. For the position I have to type this: * Player.objects.filter(position__in=Position.objects.filter(name=positionpost)) * How can I

Re: Query parameters for receiving post

2013-10-09 Thread Denis Chernoshchekov
You can pass filter params like a dict - Player.objects.filter(**your_dict), so you need only prepare your dict from POST. 8 жовт. 2013 17:42, користувач "Hélio Miranda" написав: > Hi > Here I am having a problem which is as follows: > I 'm getting parameters via post to make

Re: Query parameters for receiving post

2013-10-09 Thread Hélio Miranda
I was testing you sent me, but it is giving me error ... is giving this error: *expected string or buffer* -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Query parameters for receiving post

2013-10-08 Thread Ramiro Morales
On Tue, Oct 8, 2013 at 11:42 AM, Hélio Miranda wrote: > > Hi > Here I am having a problem which is as follows: > I 'm getting parameters via post to make querys depending on paramtros I are > passed ... doing gender filters. > So I'm doing well > def filter(request): > if

Query parameters for receiving post

2013-10-08 Thread Hélio Miranda
Hi Here I am having a problem which is as follows: I 'm getting parameters via post to make querys depending on paramtros I are passed ... doing gender filters. So I'm doing well *def filter(request):* *if request.method == 'POST':* *namepost = request.POST.get('name')* *