def save_form(form, update_user=None, is_draft=True, **kwargs):
 obj = super(MediaForm, form).save(commit=False, **kwargs)
 if update_user:
  obj.updated_by = update_user
 obj.is_draft = is_draft
 obj.save()
 return obj

def save_form ( form , update_user = None , is_draft = True , ** kwargs ) : obj = super ( MediaForm , form ) . save ( commit = False , ** kwargs ) if update_user : obj . updated_by = update_user obj . is_draft = is_draft obj . save ( ) return obj
save a media form .