Fixed #23530 -- Specified PyYAML requirement in initial-data.txt

Thanks aks for the report.
This commit is contained in:
Claude Paroz 2014-09-21 16:00:19 +02:00
parent d18579d219
commit 5bf654e44b
1 changed files with 6 additions and 4 deletions

View File

@ -21,10 +21,12 @@ Providing initial data with fixtures
A fixture is a collection of data that Django knows how to import into a A fixture is a collection of data that Django knows how to import into a
database. The most straightforward way of creating a fixture if you've already database. The most straightforward way of creating a fixture if you've already
got some data is to use the :djadmin:`manage.py dumpdata <dumpdata>` command. got some data is to use the :djadmin:`manage.py dumpdata <dumpdata>` command.
Or, you can write fixtures by hand; fixtures can be written as XML, YAML, or Or, you can write fixtures by hand; fixtures can be written as JSON, XML or YAML
JSON documents. The :doc:`serialization documentation </topics/serialization>` (with PyYAML_ installed) documents. The :doc:`serialization documentation
has more details about each of these supported :ref:`serialization formats </topics/serialization>` has more details about each of these supported
<serialization-formats>`. :ref:`serialization formats <serialization-formats>`.
.. _PyYAML: http://www.pyyaml.org/
As an example, though, here's what a fixture for a simple ``Person`` model might As an example, though, here's what a fixture for a simple ``Person`` model might
look like in JSON: look like in JSON: