djangosnippets.org: Latest snippets tagged with 'string-formatting'http://djangosnippets.org/tags/string-formatting/2013-01-15T14:59:11.240376-06:00Filter that adds a period at the end of a string
2013-01-15T14:59:11.240376-06:00Ztyxhttp://djangosnippets.org/snippets/2878/<p>Yeah, I know this is a very basic filter, but I thought I might as well share it with the world...</p>
Freely redistributableSimple template tag to do |stringformat filter with format from a variable
2011-04-12T17:18:49.071890-05:00leopdhttp://djangosnippets.org/snippets/2414/<p>Formats a django variable using a python string formatting as specified
in another template variable. Similar to |stringformat.
Takes two arguments: the django template variable with the item to be formatted
and the django template variable containing the format string.<br />
</p>
<pre><code>{% pyformat number formatstringvar %}
</code></pre>
<p>Place this file in <code>appname/templatetags/pyformat.py …</code></p>
Freely redistributable