Opened 8 years ago

Closed 8 years ago

#5850 closed (worksforme)

Can't use filters inside tags in templates

Reported by: italomaia Owned by: nobody
Component: Template system Version: master
Severity: Keywords: filters tags
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Something like the folowing code should work : {% url project.app.views.my_page page_number|add:1 %} .
It seems like filters can not be used inside tags, what looks odd to me, as filters are some kind of
simple helpers.

Change History (1)

comment:1 Changed 8 years ago by brosner

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

This works for me. You might want to read up on how to use the {% url %} tag: http://www.djangoproject.com/documentation/templates/#url. To ensure you are using the rest of it correctly. Re-open only if you can provide exact reasoning and examples to support it.

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