From 8ef8bc0f64c463684268a7c55f3d3da4de066c0d Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Fri, 28 Sep 2018 18:57:12 +0500 Subject: Refs #28909 -- Simplifed code using unpacking generalizations. --- docs/topics/serialization.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/topics/serialization.txt b/docs/topics/serialization.txt index 70c023fe70..c3ef1558bf 100644 --- a/docs/topics/serialization.txt +++ b/docs/topics/serialization.txt @@ -99,7 +99,7 @@ attribute. The ``name`` attribute of the base class will be ignored. In order to fully serialize your ``Restaurant`` instances, you will need to serialize the ``Place`` models as well:: - all_objects = list(Restaurant.objects.all()) + list(Place.objects.all()) + all_objects = [*Restaurant.objects.all(), *Place.objects.all()] data = serializers.serialize('xml', all_objects) Deserializing data -- cgit v1.3