'Replaces a collection of resources with another collection.
Calls ``delete_list`` to clear out the collection then ``obj_create``
with the provided the data to create the new collection.
Return ``HttpNoContent`` (204 No Content) if
``Meta.always_return_data = False`` (default).
Return ``HttpAccepted`` (200 OK) if
``Meta.always_return_data = True``.'

def put_list(self, request, **kwargs):

    deserialized = self.deserialize(request, request.body, format=request.META.get(u'CONTENT_TYPE', u'application/json'))
    deserialized = self.alter_deserialized_list_data(request, deserialized)
    if (self._meta.collection_name not in deserialized):
        raise BadRequest((u"Invalid    data    sent:    missing    '%s'" % self._meta.collection_name))
    basic_bundle = self.build_bundle(request=request)
    self.obj_delete_list_for_update(bundle=basic_bundle, **self.remove_api_resource_names(kwargs))
    bundles_seen = []
    for object_data in deserialized[self._meta.collection_name]:
        bundle = self.build_bundle(data=dict_strip_unicode_keys(object_data), request=request)
        try:
            self.obj_create(bundle=bundle, **self.remove_api_resource_names(kwargs))
            bundles_seen.append(bundle)
        except ImmediateHttpResponse:
            self.rollback(bundles_seen)
            raise
    if (not self._meta.always_return_data):
        return http.HttpNoContent()
    else:
        to_be_serialized = {self._meta.collection_name: [self.full_dehydrate(b, for_list=True) for b in bundles_seen]}
        to_be_serialized = self.alter_list_data_to_serialize(request, to_be_serialized)
        return self.create_response(request, to_be_serialized)
