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:
> *
> Player.objects.filter(country__in=Country.objects.filter(nationality__in=Nationality.objects.filter(name='Espanhol
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 G
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 =
>> 'nationality__in'*
>>
>>
>> 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 =
> '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 d
*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 Miranda
>
>> I put that work, I
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 this message because
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 received
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 django
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 the filter is:
> *
> Pl
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 on
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 message because you are s
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 e
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 not direct as other fi
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 implement
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 querys depending on
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 djang
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 request.method == 'P
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')*
*surnam
18 matches
Mail list logo