Opened 10 years ago

Closed 10 years ago

#4000 closed (fixed)

Documentation incorrectly states that filter arguments should be quoted

Reported by: Johan Bergström <bugs@…> Owned by: Jacob
Component: Documentation Version: master
Severity: Keywords: filter arguments quoted
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

(Found here: http://www.djangoproject.com/documentation/templates/#filters )

Documentation mentions that all arguments to filters should be quoted when it clearly isn't needed.

Regression tests for truncateword and others pass ints to filters, which made me ask people on IRC which was correct - docs or tests.
I was told that docs was incorrect and couldn't find another ticket about this - so here it is.

Attachments (1)

filterarguments.diff (1.5 KB) - added by Simon G. <dev@…> 10 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by Chris Beaven

Needs documentation: set
Triage Stage: UnreviewedAccepted

Just to be clear, we're talking about passing strings to filters -- the documentation does incorrectly say "Filter arguments always are in double quotes."

comment:2 Changed 10 years ago by Johan Bergström <johan@…>

Am i missing something - isn't this only about punting that specific sentence?

Changed 10 years ago by Simon G. <dev@…>

Attachment: filterarguments.diff added

comment:3 Changed 10 years ago by Simon G. <dev@…>

Has patch: set
Needs documentation: unset

The attached patch removes the part about quoting in the docs, and adds a test to check that filter arguments can be numeric.

comment:4 Changed 10 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [5436]) Fixed #4000 - changed documentation to note that filter arguments no longer need to be quoted (and added a test to that effect). Thanks, SmileyChris.

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