Code

Opened 6 years ago

Closed 6 years ago

#6232 closed (duplicate)

ifchanged template tag does not allow paramater with filter

Reported by: keizie@… Owned by: nobody
Component: Template system Version: 0.96
Severity: Keywords: tag filter
Cc: django-ko@… Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by gwilson)

{% ifchanged var|filter %} blah {% endifchanged %} seems to fail silently.
This could be an enhancement.

Attachments (1)

6232.diff (2.7 KB) - added by SmileyChris 6 years ago.
enhancement, with test

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by gwilson

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

All template tags and filters are supposed to fail silently.

comment:2 Changed 6 years ago by keizie@…

  • Resolution invalid deleted
  • Status changed from closed to reopened

Silent failure is not the point at all.

ifchanged does not allow var with filter but just var alone.
I want to use var|filter as parameter of ifchanged.

Close this ticket if you don't allow such syntax.

comment:3 Changed 6 years ago by gwilson

  • Description modified (diff)
  • Summary changed from ifchanged paramater with filter to ifchanged template tag does not allow paramater with filter
  • Triage Stage changed from Unreviewed to Accepted

In that case, I'll re-open this.

Changed 6 years ago by SmileyChris

enhancement, with test

comment:4 Changed 6 years ago by SmileyChris

  • Triage Stage changed from Accepted to Ready for checkin

If Gary accepts the idea, then this patch handles it nicely so no reason not to push to checkin.

comment:5 Changed 6 years ago by mtredinnick

  • Resolution set to duplicate
  • Status changed from reopened to closed

Dupe of #5756.

This is fixing the symptom, not the root problem (there are other tags with the same problem, so we should fix them all).

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.