Opened 18 years ago
Closed 18 years ago
#4000 closed (fixed)
Documentation incorrectly states that filter arguments should be quoted
Reported by: | 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)
Change History (5)
comment:1 by , 18 years ago
Needs documentation: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 18 years ago
Am i missing something - isn't this only about punting that specific sentence?
by , 18 years ago
Attachment: | filterarguments.diff added |
---|
comment:3 by , 18 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 , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Just to be clear, we're talking about passing strings to filters -- the documentation does incorrectly say "Filter arguments always are in double quotes."