Opened 17 years ago
Closed 17 years ago
#8532 closed (fixed)
Using Yaml format in Fixtures
| Reported by: | amiroff | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Keywords: | fixtures loaddata yml yaml | |
| Cc: | amiroff@… | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
By default, loaddata command only looks for xml and json fixtures.
Documentation at http://docs.djangoproject.com/en/dev/howto/initial-data/#providing-initial-data-with-fixtures also mentions YAML format as being supported out of the box.
That is not true and misleading. At least on windows, PyYaml (http://pyyaml.org/wiki/PyYAML) must be installed on system for Django to look for .yaml files in fixture directories.
I think that should be documented, because new users can waste lots of hours wondering why their fixtures do not get loaded.
Also, using loaddata with --verbosity=2 can help diagnosing the problem. Mentioning this on documentation page could be a good step.
Change History (2)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
This is already fixed in the refactored docs: http://docs.djangoproject.com/en/dev/topics/serialization/#notes-for-specific-serialization-formats