Opened 16 years ago
Closed 16 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 Changed 16 years ago by
Needs documentation: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 Changed 16 years ago by
Am i missing something - isn't this only about punting that specific sentence?
Changed 16 years ago by
Attachment: | filterarguments.diff added |
---|
comment:3 Changed 16 years ago by
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 16 years ago by
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."