Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed 19308. Clarified docs for stringformat filter. #524

Closed
wants to merge 1 commit into from

3 participants

@shabda

No description provided.

@claudep claudep commented on the diff
docs/ref/templates/builtins.txt
((6 lines not shown))
-If ``value`` is ``"Joel is a slug"``, the output will be ``"Joel is a slug"``.
+If ``value`` is ``"10"``, the output will be ``"1.000000E+01"``.
@claudep Collaborator
claudep added a note

The quotes around 10 are slightly misleading, if you pass the string "10", it will fail. So value should really be 10 (integer) in this case. Maybe simply remove the quotes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham
Owner

Removed the quotes per Claude's suggestion and merged, thanks!

@timgraham timgraham closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 17, 2012
  1. @shabda
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/ref/templates/builtins.txt
View
4 docs/ref/templates/builtins.txt
@@ -1909,9 +1909,9 @@ for documentation of Python string formatting
For example::
- {{ value|stringformat:"s" }}
+ {{ value|stringformat:"E" }}
-If ``value`` is ``"Joel is a slug"``, the output will be ``"Joel is a slug"``.
+If ``value`` is ``"10"``, the output will be ``"1.000000E+01"``.
@claudep Collaborator
claudep added a note

The quotes around 10 are slightly misleading, if you pass the string "10", it will fail. So value should really be 10 (integer) in this case. Maybe simply remove the quotes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.. templatefilter:: striptags
Something went wrong with that request. Please try again.