$ 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)
.yaml is what you want. Make sure YAML is installed and available to Python by running:
> pip install pyyaml
debian based linux - ubuntu etc etcsudo apt-get install python-yaml
orapt-get install python-yaml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With