On Mon, Aug 17, 2009 at 6:39 AM, Adonis<achrysoch...@hotmail.com> wrote:
> My problem is that even if the 'projects' queryset is empty, it still > includes the projects.html > Is there another way to do it? If you're using at least Django 1.1, you can use the empty tag: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for-empty For example: {% for item in projects %} {% include projects.html %} {% empty %} There are no items in the project. {% endfor %} --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---