mirror of
https://github.com/django/django.git
synced 2025-04-13 03:52:20 +00:00
parent
ab148c02ce
commit
8df5ce80d2
@ -18,11 +18,6 @@ max_line_length = 88
|
||||
[*.html]
|
||||
indent_size = 2
|
||||
|
||||
# The JSON files contain newlines inconsistently
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
insert_final_newline = ignore
|
||||
|
||||
[**/admin/js/vendor/**]
|
||||
indent_style = ignore
|
||||
indent_size = ignore
|
||||
|
@ -39,8 +39,7 @@ class Serializer(PythonSerializer):
|
||||
if self.options.get("indent"):
|
||||
self.stream.write("\n")
|
||||
self.stream.write("]")
|
||||
if self.options.get("indent"):
|
||||
self.stream.write("\n")
|
||||
self.stream.write("\n")
|
||||
|
||||
def end_object(self, obj):
|
||||
# self._current has the field data
|
||||
|
@ -293,7 +293,8 @@ of each library are the first to add or confirm compatibility with Python 3.12:
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
* ...
|
||||
* The :ref:`JSON <serialization-formats-json>` serializer now writes a newline
|
||||
at the end of the output, even without the ``indent`` option set.
|
||||
|
||||
.. _deprecated-features-6.0:
|
||||
|
||||
|
@ -7,4 +7,4 @@
|
||||
"pub_date": "2006-06-16 14:00:00"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -7,4 +7,4 @@
|
||||
"pub_date": "2006-06-16 14:00:00"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
2
tests/fixtures/fixtures/fixture1.json
vendored
2
tests/fixtures/fixtures/fixture1.json
vendored
@ -31,4 +31,4 @@
|
||||
"title": "News Stories"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
2
tests/fixtures/fixtures/fixture2.json
vendored
2
tests/fixtures/fixtures/fixture2.json
vendored
@ -15,4 +15,4 @@
|
||||
"pub_date": "2006-06-16 15:00:00"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -6,4 +6,4 @@
|
||||
"name": "Load Absolute Path Test"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -80,4 +80,4 @@
|
||||
"channels": [6]
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -1 +1 @@
|
||||
[]
|
||||
[]
|
||||
|
@ -14,4 +14,4 @@
|
||||
"name": "Neal Stephenson"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -14,4 +14,4 @@
|
||||
"name": "Neal Stephenson"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -22,4 +22,4 @@
|
||||
"stores": [11]
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -9,4 +9,4 @@
|
||||
"weight": 1.2
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -95,4 +95,4 @@
|
||||
"poly" : "POLYGON ((-95.447918 29.727275, -95.447418 29.71003, -95.446918 29.69013, -95.454318 29.68893, -95.475819 29.68903, -95.475819 29.69113, -95.484419 29.69103, -95.484519 29.69903, -95.480419 29.70133, -95.480419 29.69833, -95.474119 29.69833, -95.474119 29.70453, -95.472719 29.71283, -95.468019 29.71293, -95.468219 29.720229, -95.464018 29.720229, -95.464118 29.724529, -95.463018 29.725929, -95.459818 29.726129, -95.459918 29.720329, -95.451418 29.720429, -95.451775 29.726303, -95.451318 29.727029, -95.447918 29.727275))"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -31,4 +31,4 @@
|
||||
"price": "100"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -7,4 +7,4 @@
|
||||
"published": "2009-7-8"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -23,4 +23,4 @@
|
||||
"editor": ["Chris Mills"]
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -15,4 +15,4 @@
|
||||
"owner": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -6,4 +6,4 @@
|
||||
"name": "Elvis Presley"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -489,7 +489,8 @@ class SerializerAPITests(SimpleTestCase):
|
||||
self.assertIs(serializer.stream_class, File)
|
||||
self.assertIsInstance(serializer.stream, File)
|
||||
self.assertEqual(
|
||||
data, '[{"model": "serializers.score", "pk": 1, "fields": {"score": 3.4}}]'
|
||||
data,
|
||||
'[{"model": "serializers.score", "pk": 1, "fields": {"score": 3.4}}]\n',
|
||||
)
|
||||
|
||||
|
||||
|
@ -13,4 +13,4 @@
|
||||
"name": "robert"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user