Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1176 closed enhancement (fixed)

[patch] Comment tag that doesn't generate a nodelist

Reported by: django@… Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The existing comment tag actually builds a nodelist from its contents. This means that you can't comment out broken template tags during debugging because they still generate exceptions.

This patch adds a skip_past(endtagname) method to the parser so that the comment tag can ignore its contents.

Attachments (1)

comment_without_parse_r1831.diff (1.2 KB) - added by django@… 9 years ago.
Comment tag without building nodelist

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by django@…

Comment tag without building nodelist

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [1964]) Fixed #1176 -- Changed {% comment %} template tag not to generate a nodelist, so it's now possible to comment-out broken template tags. Thanks, Kieran Holland

Note: See TracTickets for help on using tickets.
Back to Top