Vizcayno wrote: > info_dict = { 'data': lst, > 'poscol': ( 2,0,11,29,18,......) > return render_to_response('pres_marcaciones.html', info_dict)
Instead of passing this two pieces into template and handle them there you should do this right in the view and pass already constructed table to the template. (This is essentially how Django's templates encourage you to keep all logic in one place - the view). So it can be done like this: table = [] for row in lst: values = [row[index] for index in (2, 0, 11, 29)] table.append(values) return render_to_response('...', {'table': table}) And then in the template you have a simple list of lists that you can easily traverse with nested 'for' loops. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---