Package madrona :: Package common :: Package templatetags :: Module order_by
[hide private]

Source Code for Module madrona.common.templatetags.order_by

 1  # http://www.djangosnippets.org/snippets/741/ 
 2  from django.template import Library 
 3   
 4  register = Library() 
5 6 @register.filter_function 7 -def order_by(queryset, args):
8 args = [x.strip() for x in args.split(',')] 9 return queryset.order_by(*args)
10