Reputation: 6888
$ python manage.py loaddata fixtures/initial_data.yaml
Problem installing fixture 'fixtures/initial_data': yaml is not a known serialization format.
$
$ python manage.py loaddata fixtures/initial_data.yml
Problem installing fixture 'fixtures/initial_data': yml is not a known serialization format.
According to Django documentation this format should be supported, but I get the above errors. JSON on the other hand works ok.
Django version:
django.VERSION (1, 3, 1, 'final', 0)
Upvotes: 15
Views: 7610
Reputation: 11
debian based linux - ubuntu etc etc
sudo apt-get install python-yaml
or
apt-get install python-yaml
Upvotes: 1
Reputation: 7858
.yaml is what you want. Make sure YAML is installed and available to Python by running:
> pip install pyyaml
Upvotes: 40