On Aug 3, 2006, at 1:05 PM, skullvulture wrote: > > Is there anyway to declare variables within a template? I'm coming > from a Zope background where with dtml you have the dtml-let tag and > with ZPT you have tal:define. Django's templating seems so much > cooler > than Zope's, but I'm missing a declare or define tag. > > ... > > I saw the topic on writing a custom tag for the food selection, but > that seems like a lot of work for such a simple task. Does anyone > have > any suggestions? Thanks.
Since you are only displaying past_shows in your list, I would simply query for those in your view. Then you can test to see if the object_list is empty and display the appropriate message. {% if object_list %} {% for show in object_list %} ... {% endfor %} {% else %} <h4>No past show information available</h4> {% endif %} 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 -~----------~----~----~----~------~----~------~--~---