def formset_initial_value_extractor(request, parameter_names):
 def _intial_value_extractor(request):
  if (not submitted):
   return []
  data = []
  for param in submitted:
   i = 0
   for val in request.POST.getlist(param):
    if (len(data) == i):
     data.append({})
    data[i][param] = val
    i += 1
  for kwargs in data:
   for recurrent in recurring:
    kwargs[recurrent] = request.POST.get(recurrent)
  initial_data = data
  return {'initial': initial_data}
 return _intial_value_extractor

def formset_initial_value_extractor ( request , parameter_names ) : def _intial_value_extractor ( request ) : if ( not submitted ) : return [ ] data = [ ] for param in submitted : i = 0 for val in request . POST . getlist ( param ) : if ( len ( data ) == i ) : data . append ( { } ) data [ i ] [ param ] = val i += 1 for kwargs in data : for recurrent in recurring : kwargs [ recurrent ] = request . POST . get ( recurrent ) initial_data = data return { 'initial' : initial_data } return _intial_value_extractor
builds a list of data that formsets should use by extending some fields to every object .