id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 6558 Need a better error message when inheriting from empty template toomim nobody "If you inherit from a template with no blocks (for instance containing just the text ""Hello""), you get the following error message: ""Caught an exception while rendering: list index out of range"" I don't know what is supposed to happen, or if this is supposed to be allowed, but it would at least be way better to have an error like ""There are no blocks in the template foo."" This happens when it's traversing the nodes in the inherited template while rendering, and finds only a TextNode and no block nodes. I don't really know what the code here is trying to do. Here's the traceback. In my code, ""base.html"" is the template that says ""hello"". {{{ ---- Environment: Request Method: GET Request URL: http://localhost:8081/pubs/ Django Version: 0.97-pre-SVN-7092 Python Version: 2.5.0 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'dubweb.polls', 'dubweb.pubs', 'django.contrib.admin'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware') Template error: In template /Users/toomim/projects/dubweb/dubweb/templates/pubs/index.html, error at line 1 Caught an exception while rendering: list index out of range 1 : {% extends ""pubs/base.html"" %} 2 : 3 : {% block middlecontent %} 4 : {% if venue_list %} 5 :