Jiri Barton wrote: >I want to be able to discern among None, empty list, and non-empty >list; then, I want to tell the user - say nothing, "nothing found", >"found the following:" resp. > > I had a similar (but a bit more complex) thing solved for me by wrapping a list in a dict:
result={} - means there were no actions result={'items':[]} - means there was a search but nothing is found result={'items':['...',...,'...']} - found And the template is like this: {% if results %} {% if results.items %} {% for item in result.items %} ... {% endfor %} {% else %} Nothing found {% endif %} {% endif %} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---