Django templates don't support ranges. You have a couple options:
- Add a range filter: http://djangosnippets.org/snippets/1357/
Here's how you add custom filters: http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
- Use a different templating system, like Mako, that does support it.
http://docs.djangoproject.com/en/dev/ref/templates/api/#using-an-alternative-template-language
Django-Mako is a shortcut project for using Mako: http://code.google.com/p/django-mako/