]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/templatetags/extra_filters.py
OSQA-525, use old style syntax for the if-statements, adds a bit of backwards compati...
[osqa.git] / 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))