Re: logic in templates

2009-08-12 Thread elminio
Thanks, And what if I want to use another thiord or maybe even fourth item customers sellers products Im new in python so thanks for help On Aug 12, 11:17 am, David Zhou wrote: > The easiest way is probably moving that list to the view.  For example > > customers = Customer.objects... > seller

Re: logic in templates

2009-08-12 Thread David Zhou
The easiest way is probably moving that list to the view. For example customers = Customer.objects... sellers = Seller.objects... filtered_list = [pair for pair in zip(sellers, customers) if pair[0].customer_id == pair[1].id] Then pass filtered_list into the template context. Inside the templ