Hello everyone,
I am newbie to django. Now-a-days am reading django docs.
While reading models i got confusion that, What is the difference between
filter chaining and filter with multiple arguments.
For example what is the diffrence between below two:
Blog.objects.filter(entry__headline__contain
7 at 5:41:29 PM UTC+3, Mahendra Gaur wrote:
>>
>> Hello everyone,
>>
>> I am newbie to django. Now-a-days am reading django docs.
>> While reading models i got confusion that, What is the difference between
>> filter chaining and filter with multiple argument
Thanks for reply.
I have tried q.query on both statements but both are giving same query. I
had tried this even before initiating this mail chain, and this was the
point where I got confused.
Thanks and regards,
Mahendra Gaur
On 3 Apr 2017 6:55 p.m., "Matthew Pava" wrote:
Hi Mahe
“Lennon” in the headline. The second
>> filter restricts the set of blogs further to those that are also linked to
>> entries that were published in 2008. The entries selected by the second
>> filter may or may not be the same as the entries in the first filter. We
>> are filter
Why do you want to set it in custom template. It would be better if you put
this variable in context dictionary while rendering and then use it in the
template on the basis of condition.
Thanks and regards,
Mahendra
On 4 Apr 2017 7:44 p.m., "valerio orfano" wrote:
> Hi there
>
> is there any c
objects.filter(entry__headline__contains='Lennon',
> entry__pub_date__year=2008)
> qs2 = Blog.objects.filter(entry__headline__contains='Lennon').filter(
> entry__pub_date__year=2008)
>
> print qs1.query
> print qs2.query
>
>
> On Tuesday, April 4, 2017 at 2:03:45 PM UTC+3
6 matches
Mail list logo