Opened 17 years ago

Closed 17 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: dev
Severity: Keywords: filter arguments quoted
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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@…> 17 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Chris Beaven, 17 years ago

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 by Johan Bergström <johan@…>, 17 years ago

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

by Simon G. <dev@…>, 17 years ago

Attachment: filterarguments.diff added

comment:3 by Simon G. <dev@…>, 17 years ago

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 by Jacob, 17 years ago

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