def sanitize_separators(value):
 if settings.USE_L10N:
  decimal_separator = get_format('DECIMAL_SEPARATOR')
  if isinstance(value, six.string_types):
   parts = []
   if (decimal_separator in value):
    (value, decimals) = value.split(decimal_separator, 1)
    parts.append(decimals)
   if settings.USE_THOUSAND_SEPARATOR:
    parts.append(value.replace(get_format('THOUSAND_SEPARATOR'), ''))
   else:
    parts.append(value)
   value = '.'.join(reversed(parts))
 return value

def sanitize_separators ( value ) : if settings . USE_L10N : decimal_separator = get_format ( 'DECIMAL_SEPARATOR' ) if isinstance ( value , six . string_types ) : parts = [ ] if ( decimal_separator in value ) : ( value , decimals ) = value . split ( decimal_separator , 1 ) parts . append ( decimals ) if settings . USE_THOUSAND_SEPARATOR : parts . append ( value . replace ( get_format ( 'THOUSAND_SEPARATOR' ) , '' ) ) else : parts . append ( value ) value = '.' . join ( reversed ( parts ) ) return value
sanitizes a value according to the current decimal and thousand separator setting .