def add_css_class(css_classes, css_class, prepend=False):
 classes_list = split_css_classes(css_classes)
 classes_to_add = [c for c in split_css_classes(css_class) if (c not in classes_list)]
 if prepend:
  classes_list = (classes_to_add + classes_list)
 else:
  classes_list += classes_to_add
 return u' '.join(classes_list)

def add_css_class ( css_classes , css_class , prepend = False ) : classes_list = split_css_classes ( css_classes ) classes_to_add = [ c for c in split_css_classes ( css_class ) if ( c not in classes_list ) ] if prepend : classes_list = ( classes_to_add + classes_list ) else : classes_list += classes_to_add return u' ' . join ( classes_list )
add a css class to a string of css classes .