Re: Jinja pattern doesnt work inside a for loop

2020-01-25 Thread Aditya Khatwa
Use custom templates tag instead doing it directly... make a function stating your {% query_set %} and then use it inside the template. On Sat, 25 Jan 2020, 18:29 Jani Eric, wrote: > thanks bro > > > On Saturday, January 25, 2020 at 3:11:33 PM UTC+5, Chinmay Dali wrote: >> >> I am trying to loo

Re: Jinja pattern doesnt work inside a for loop

2020-01-25 Thread Jani Eric
thanks bro On Saturday, January 25, 2020 at 3:11:33 PM UTC+5, Chinmay Dali wrote: > > I am trying to loop over a product list{more so a queryset} in django using > for loop, by adding the range of products The following code works when > printed out in cmd prompt > > I am doing something like t

Re: Jinja pattern doesnt work inside a for loop

2020-01-25 Thread Jason
While you can use Jinja templates in django, that requires additional configuration to ensure the proper template renderer is used. Otherwise, by default, django uses its own template renderer. You don't say whether you've taken the necessary steps to have your django project use Jinja, and fr

Jinja pattern doesnt work inside a for loop

2020-01-25 Thread Chinmay Dali
I am trying to loop over a product list{more so a queryset} in django using for loop, by adding the range of products The following code works when printed out in cmd prompt I am doing something like this ''' for card in allproduct[nextRangePage:limit]: ''' in django template using this