def munge_name(name):
 if isinstance(name, unicode):
  name = substitute_ascii_equivalents(name)
 name = re.sub('[ .:/]', '-', name)
 name = re.sub('[^a-zA-Z0-9-_]', '', name).lower()
 name = _munge_to_length(name, model.PACKAGE_NAME_MIN_LENGTH, model.PACKAGE_NAME_MAX_LENGTH)
 return name

def munge_name ( name ) : if isinstance ( name , unicode ) : name = substitute_ascii_equivalents ( name ) name = re . sub ( '[ .:/]' , '-' , name ) name = re . sub ( '[^a-zA-Z0-9-_]' , '' , name ) . lower ( ) name = _munge_to_length ( name , model . PACKAGE_NAME_MIN_LENGTH , model . PACKAGE_NAME_MAX_LENGTH ) return name
munges the package name field in case it is not to spec .