Created
April 16, 2009 20:10
-
-
Save nathanborror/96627 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@register.filter | |
def gt(value, arg): | |
"Returns a boolean of whether the value is greater than the argument" | |
return value > int(arg) | |
@register.filter | |
def lt(value, arg): | |
"Returns a boolean of whether the value is less than the argument" | |
return value < int(arg) | |
@register.filter | |
def gte(value, arg): | |
"Returns a boolean of whether the value is greater than or equal to the argument" | |
return value >= int(arg) | |
@register.filter | |
def lte(value, arg): | |
"Returns a boolean of whether the value is less than or equal to the argument" | |
return value <= int(arg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment