This commit is contained in:
guange 2019-01-21 11:03:52 +08:00
parent c469df020a
commit a515115586
1 changed files with 1 additions and 1 deletions

View File

@ -6,4 +6,4 @@ register = template.Library()
@register.simple_tag @register.simple_tag
def present(val1, val2): def present(val1, val2):
"""获取两个数的百分比,取整 val1 / val2 """ """获取两个数的百分比,取整 val1 / val2 """
return int(val1 * 100 / val2) return int(int(val1) * 100 / int(val2))