def by_skills(queryset, skill_string=None):
  """ Filter queryset by a comma delimeted skill list """
  if skill_string:
    operator, items = get_operator_and_items(skill_string)
    q_obj = SQ()
    for s in items:
      if len(s) > 0:
        q_obj.add(SQ(skills=s), operator)
    queryset = queryset.filter(q_obj)
  return queryset
Filter queryset by a comma delimeted skill list