Skip to content

Instantly share code, notes, and snippets.

@AyatoKinkori
Created August 25, 2014 06:49
Show Gist options
  • Save AyatoKinkori/3913a6a3286e2cae0b7c to your computer and use it in GitHub Desktop.
Save AyatoKinkori/3913a6a3286e2cae0b7c to your computer and use it in GitHub Desktop.
from django import template
register = template.Library()
@register.filter
def gt(a, b):
return a > b
@register.filter
def lt(a, b):
return a < b
@register.filter
def gte(a, b):
return a >= b
@register.filter
def lte(a, b):
return a <= b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment