]> git.openstreetmap.org Git - osqa.git/commitdiff
OSQA-525, use old style syntax for the if-statements, adds a bit of backwards compati...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 1 Aug 2011 11:08:30 +0000 (11:08 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 1 Aug 2011 11:08:30 +0000 (11:08 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1145 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/templatetags/extra_filters.py

index e13923fe30330f7bd7f8575b21655a435a8668ea..8dea68c9c0d4c3c944c526450ba4fcafb73064e5 100644 (file)
@@ -22,7 +22,12 @@ def decorated_int(number, cls="thousand"):
         number = int(number)    # allow strings or numbers passed in
         if number > 999:
             thousands = float(number) / 1000.0
-            format = "%.1f" if number < 99500 else "%.0f"
+
+            if number < 99500:
+                format = "%.1f"
+            else:
+                format = "%.0f"
+
             s = format % thousands
 
             return mark_safe("<span class=\"%s\">%sk</span>" % (cls, s))