original_docstring: 
          Put serialized data to form_data field, then save.
          
docstring: Put serialized data to form_data field, then save.
docstring_tokens: Put serialized data to form_data field then save .
code: def save(self, commit=True):
          """
          Put serialized data to form_data field, then save.
          """
          if self.errors:
              raise ValueError("Can't save, because form does not validate.")
  
          self.instance.form_data = self.cleaned_data
  
          _glossary = self.plugin_instance.glossary
          self.instance.name = _glossary.get('name', _glossary['form_id'])
  
          if self.request:
              self.instance.meta_data = self._get_meta_data(self.request)
              self.instance.by_user = self.request.user if self.request.user.is_authenticated else None
  
          # handle upload for file fields
          for key, field in self.fields.items():
              if isinstance(field, FileField):
                  value = field.widget.value_from_datadict(self.data, self.files, key)
                  if issubclass(value.__class__, File):
                      new_file = handle_uploaded_file(value)
                      self.instance.form_data[key] = new_file.name
                      self.initial[key] = new_file
  
          return super().save(commit)
code_tokens: def save ( self , commit = True ) : if self . errors : raise ValueError ( "Can't save, because form does not validate." ) self . instance . form_data = self . cleaned_data _glossary = self . plugin_instance . glossary self . instance . name = _glossary . get ( 'name' , _glossary [ 'form_id' ] ) if self . request : self . instance . meta_data = self . _get_meta_data ( self . request ) self . instance . by_user = self . request . user if self . request . user . is_authenticated else None for key , field in self . fields . items ( ) : if isinstance ( field , FileField ) : value = field . widget . value_from_datadict ( self . data , self . files , key ) if issubclass ( value . __class__ , File ) : new_file = handle_uploaded_file ( value ) self . instance . form_data [ key ] = new_file . name self . initial [ key ] = new_file return super ( ) . save ( commit )
short_docstring: Put serialized data to form_data field, then save.
short_docstring_tokens: Put serialized data to form_data field then save .
comment: """
          Put serialized data to form_data field, then save.
          """$SEP$# handle upload for file fields