On Aug 3, 2006, at 2:45 PM, skullvulture wrote: > I have another loop above that displays upcoming shows. Is it > possible > to have two object lists, one of upcoming and one of past shows be > passed to the template?
Yes, you can pass any sort of data that you want to your template. So, if you have two lists, upcoming_shows and past_shows, you can pass them from your view. In the example below, list_1 and list_2 are the query sets you generate in your view. I guessed at the query you would use to generate, but you should get the idea. The key values in the returned dictionary should match those in your template. list_1 = Shows.objects.filter(upcoming=True) list_2 = Shows.objects.filter(past=True) return render_to_response('template.html' {'upcoming_shows':list_1, 'past_shows':list_2}) Don --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---