Re: Django regroup not working as expected

2010-10-07 Thread Scott Gould
Your .list is in the wrong place: {% for date in sale_list%} {{ date.grouper }} {% for sale in date.list %} {{ sale.item }} - {{ sale.qty }} {% endfor %} {% endfor %} Regards Scott On Oct 5, 2:28 pm, Gath wrote: > Guys > > I have the follow

Django regroup not working as expected

2010-10-05 Thread Gath
Guys I have the following view in my django application def ViewSale( request ): salecur = Sale.objects.filter(user=2).order_by('sale_date') return render_to_response('myapp/sale.html',{'salecur':salecur}) my template looks like this {% regroup salecur by sale_date as sale_list %}