parameters: (request)
docstring: Update an object's value. Should be an AJAX POST.
  
      :param request: The Django request.
      :type request: :class:`django.http.HttpRequest`
      :returns: :class:`django.http.HttpResponse`
docstring_summary: Update an object's value. Should be an AJAX POST.
docstring_tokens: Update an object s value . Should be an AJAX POST .
function: def update_objects_value(request):
      """
      Update an object's value. Should be an AJAX POST.
  
      :param request: The Django request.
      :type request: :class:`django.http.HttpRequest`
      :returns: :class:`django.http.HttpResponse`
      """
  
      if request.method == 'POST' and request.is_ajax():
          type_ = request.POST['coll']
          oid = request.POST['oid']
          object_type = request.POST.get('type')
          value = request.POST['value']
          new_value = request.POST['new_value']
          user = request.user
          acl = get_acl_object(type_)
          if user.has_access_to(acl.OBJECTS_EDIT):
              results = update_object_value(type_,
                                            oid,
                                            object_type,
                                            value,
                                            new_value,
                                            user)
          else:
              results = {'success':False,
                         'message':'User does not have permission to modify object.'}
          if results['success']:
              message = "Successfully updated object value: %s" % results['message']
              result = {'success': True, 'message': message}
          else:
              message = "Error updating object value: %s" % results['message']
              result = {'success': False, 'message': message}
          return HttpResponse(json.dumps(result), content_type="application/json")
      else:
          error = "Expected AJAX POST"
          return render(request, "error.html",
                                    {"error" : error })
function_tokens: def update_objects_value ( request ) : if request . method == 'POST' and request . is_ajax ( ) : type_ = request . POST [ 'coll' ] oid = request . POST [ 'oid' ] object_type = request . POST . get ( 'type' ) value = request . POST [ 'value' ] new_value = request . POST [ 'new_value' ] user = request . user acl = get_acl_object ( type_ ) if user . has_access_to ( acl . OBJECTS_EDIT ) : results = update_object_value ( type_ , oid , object_type , value , new_value , user ) else : results = { 'success' : False , 'message' : 'User does not have permission to modify object.' } if results [ 'success' ] : message = "Successfully updated object value: %s" % results [ 'message' ] result = { 'success' : True , 'message' : message } else : message = "Error updating object value: %s" % results [ 'message' ] result = { 'success' : False , 'message' : message } return HttpResponse ( json . dumps ( result ) , content_type = "application/json" ) else : error = "Expected AJAX POST" return render ( request , "error.html" , { "error" : error } )