def coerce_put_post(request):
 if (request.method == 'PUT'):
  if hasattr(request, '_post'):
   del request._post
   del request._files
  try:
   request.method = 'POST'
   request._load_post_and_files()
   request.method = 'PUT'
  except AttributeError:
   request.META['REQUEST_METHOD'] = 'POST'
   request._load_post_and_files()
   request.META['REQUEST_METHOD'] = 'PUT'
  request.PUT = request.POST

def coerce_put_post ( request ) : if ( request . method == 'PUT' ) : if hasattr ( request , '_post' ) : del request . _post del request . _files try : request . method = 'POST' request . _load_post_and_files ( ) request . method = 'PUT' except AttributeError : request . META [ 'REQUEST_METHOD' ] = 'POST' request . _load_post_and_files ( ) request . META [ 'REQUEST_METHOD' ] = 'PUT' request . PUT = request . POST
django doesnt particularly understand rest .