Hi Vaibhav,

I think this would do what you want. Make sure too call the objects on the
model name (  Modelname  ) ;-)


systems = ['windows', 'unix']
variable = Modelname.objects.filter(clientname=cname, clienttype__in=systems,
errorcode='20')



Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in


On Wed, Mar 13, 2019 at 5:17 PM Krishnasagar Subhedarpage <
pagesa...@gmail.com> wrote:

> You could do using django ORM query expressions. Refer below link:
> https://docs.djangoproject.com/en/2.1/ref/models/expressions/
>
>
> Regards,
> Krishnasagar Subhedarpage
>
>
>
> On Wed, 13 Mar 2019 at 17:14, Vaibhav Mishra <mevaib...@gmail.com> wrote:
>
>> Hi All,
>>
>> I am trying to achieve below ,
>>
>> variable = object.filter(clientname =cname , clienttype='windows' and
>> clienttype='unix', errorcode='20')
>>
>>
>>
>>  Notice that I want to filter by two or more values in second parameter..
>> How can we do this ?
>>
>> --
>> 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-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/54464687-7fd0-4103-b74f-5de566ae9e89%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/54464687-7fd0-4103-b74f-5de566ae9e89%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAChYJc8NwTG5LDBmjBbFav3b125dOsNCTwtHN%3DJrMbhrZ9T0rw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAChYJc8NwTG5LDBmjBbFav3b125dOsNCTwtHN%3DJrMbhrZ9T0rw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMKMUjt2mw0mfbHHqD2p7_PPD2%3DGFgJM0QadR%3Di_bb5HpG7ORA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to