Opened 8 years ago

Closed 8 years ago

#19244 closed Uncategorized (fixed)

Provide the missing examples from the "Built-in template tags and filters" page

Reported by: Daniel Greenfeld Owned by: Daniel Greenfeld
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Any template tag or filter that doesn't reference another page should have at least one example. Missing examples include:

  • comment
  • debug
  • ifnotequal (is this one necessary?)
  • templatetag
  • dictsortreversed (is this one necessary?)
  • escape
  • force_escape
  • pprint
  • timesince
  • timeuntil

Change History (6)

comment:1 Changed 8 years ago by Daniel Greenfeld

The following won't be included in my patch:

  • debug is such a special case I'm not including it in this ticket anymore.
  • ifnotequal should not be documented, just so that people are encouraged more to use the '!=' and 'is not' operators.
  • dictsortreversed is not being covered as the story is too simple to require an example.
  • As pprint is supposed to "Prints the formatted representation of object on stream, followed by a newline" and doesn't seem to actually do that when I try it, I suspect this filter is broken. May open a separate ticket on it.
Version 0, edited 8 years ago by Daniel Greenfeld (next)

comment:2 Changed 8 years ago by Julien Phalip

Triage Stage: UnreviewedAccepted

Great idea! Please do open a ticket for pprint if you find an issue with it. Thanks!

comment:3 Changed 8 years ago by Daniel Greenfeld

Pull request submitted! See

comment:4 Changed 8 years ago by Daniel Greenfeld

Just confirmed that pprint does work but it's hard to come up with a good, terse example. Leaving it off for the same reason I'm leaving off debug. It's too special of a case.

comment:5 Changed 8 years ago by Aymeric Augustin

The pull request looks good, I've left only a small comment.

comment:6 Changed 8 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: newclosed

In e27a43cc54f120c49cac33b36568b128bcfaef5a:

Merge pull request #509 from pydanny/ticket_19244

Fixed #19244 -- Provided examples for some built-in templatetags and filters

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