def build_filter(class_name, *args):
 if (not hasattr(filters, class_name)):
  return None
 filterclass = getattr(filters, class_name)
 return filterclass(*args)

def build_filter ( class_name , * args ) : if ( not hasattr ( filters , class_name ) ) : return None filterclass = getattr ( filters , class_name ) return filterclass ( * args )
returns a filter object of class class_name .