Opened 17 years ago
Closed 17 years ago
#7318 closed (fixed)
extends tag fails with an IndexError when parent template consists only of a TextNode (has patch)
Reported by: | Matthias Kestenholz | Owned by: | Matthias Kestenholz |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | extends | |
Cc: | mk@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Suppose, base.html does not contain any tags or blocks, and home.html only consists of '{% extends "base.html" %}', the extends tag falls flat on its face with an IndexError in ExtendsNode::render (Line 73)
The attached patch fixes this misbehaviour. (Granted, the usage is not make much sense, but Django still should not error out.)
I've added myself to the AUTHORS file. Feel free to drop the attribution (or commit a better patch)!
Attachments (1)
Change History (3)
by , 17 years ago
Attachment: | fix-extends-tag.patch added |
---|
comment:1 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Promoting to ready for checkin, since this is a really simple fix for a file which was last modified in February 2008.
I've added some tests and a comment explaining why this change is necessary.