app/soc/views/helper/forms.py
changeset 639 1f92bd41b914
parent 612 3cca81b1e5a1
child 739 b245c2b814c5
equal deleted inserted replaced
638:22ec01fdf8f4 639:1f92bd41b914
   318   """Collects all cleaned fields and returns them with the key_name.
   318   """Collects all cleaned fields and returns them with the key_name.
   319 
   319 
   320   Args:
   320   Args:
   321     form: The form from which the cleaned fields should be collected
   321     form: The form from which the cleaned fields should be collected
   322 
   322 
   323   Returns: All the fields that are in the form's cleaned_data
   323   Returns: 
   324   property are returned. If there is a key_name field, it is not
   324     All the fields that are in the form's cleaned_data property are returned. 
   325   included in the returend fields, instead, it is returned as the
   325     If there is a key_name field, it is not included in the returend fields, 
   326   first element in the returned tuple. If no key_name field is
   326     instead, it is returned as the first element in the returned tuple. 
   327   present, None is returned as first value instead.
   327     If no key_name field is present, None is returned as first value instead.
   328   """
   328   """
   329 
   329 
   330   fields = {}
   330   fields = {}
   331 
   331 
   332   key_name = None
   332   key_name = None