Django

Code

Ticket #4000 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

Documentation incorrectly states that filter arguments should be quoted

Reported by: Johan Bergström <bugs@bergstroem.nu> Assigned to: jacob
Milestone: Component: Documentation
Version: SVN Keywords: filter arguments quoted
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

filterarguments.diff (1.5 kB) - added by Simon G. <dev@simon.net.nz> on 04/30/07 08:32:46.

Change History

04/10/07 22:34:51 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs set to 1.

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

04/18/07 03:11:12 changed by Johan Bergström <johan@bergstroem.nu>

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

04/30/07 08:32:46 changed by Simon G. <dev@simon.net.nz>

  • attachment filterarguments.diff added.

04/30/07 08:34:04 changed by Simon G. <dev@simon.net.nz>

  • needs_docs deleted.
  • has_patch set to 1.

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

06/07/07 13:18:45 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

(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?.


Add/Change #4000 (Documentation incorrectly states that filter arguments should be quoted)




Change Properties
Action