Django

Code

Ticket #5862 (closed: wontfix)

Opened 2 years ago

Last modified 2 years ago

Filters are not applied in an include tag

Reported by: gnuvince Assigned to: nobody
Milestone: Component: Template system
Version: SVN Keywords: tplrf-fixed
Cc: Triage Stage: Design decision needed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

With the extends tag, you can do the following (trivial filter used for example purpose):

{% extends "foo/bar"|add_html_extension %}

And the filter will be applied to "foo/bar" before the call to extends. I figured this would work with the include tag as well, but it doesn't.

{% include "foo/bar"|add_html_extension %}

Here, the filter will never be called. Could we fix this?

Attachments

Change History

01/03/08 03:41:09 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Design decision needed.
  • needs_tests changed.
  • needs_docs changed.

07/18/08 14:01:32 changed by emulbreh

  • keywords set to tplrf-fixed.

This would be fixed by the refactoring proposed in #7806.

08/19/08 10:40:11 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to wontfix.

No, this really isn't worth it. It's "programming in templates". Just pass in the right value to include (in a variable).


Add/Change #5862 (Filters are not applied in an include tag)




Change Properties
Action