def parse_html_dict(dictionary, prefix=''):
 ret = MultiValueDict()
 regex = re.compile(('^%s\\.(.+)$' % re.escape(prefix)))
 for field in dictionary:
  match = regex.match(field)
  if (not match):
   continue
  key = match.groups()[0]
  value = dictionary.getlist(field)
  ret.setlist(key, value)
 return ret

def parse_html_dict ( dictionary , prefix = '' ) : ret = MultiValueDict ( ) regex = re . compile ( ( '^%s\\.(.+)$' % re . escape ( prefix ) ) ) for field in dictionary : match = regex . match ( field ) if ( not match ) : continue key = match . groups ( ) [ 0 ] value = dictionary . getlist ( field ) ret . setlist ( key , value ) return ret
used to support dictionary values in html forms .