On Thu, Oct 11, 2012 at 4:51 AM, Larry Martell <larry.mart...@gmail.com> wrote: > On Thu, Oct 11, 2012 at 1:37 AM, Joseph Wayodi <jway...@gmail.com> wrote: >> On Thu, Oct 11, 2012 at 2:23 AM, Larry Martell <larry.mart...@gmail.com> >> wrote: >>> I'm having trouble getting django to read my fixture file. I created it in >>> yaml: >>> >>> - model: cdsem.fields >>> pk: 1 >>> fields: >>> name: data_file_id >>> description: data_file_id >>> - model: cdsem.fields >>> pk: 2 >>> fields: >>> name: tool_id >>> description: tool_id >>> >>> and so on. >>> >>> I put it in a file called initial_data.yaml in the fixtures dir of my >>> app. When I run syncdb it does not pick it up. FIXTURE_DIRS was not >>> set. I should not have to set it, but I did anyway, but it still did >>> not pick up the file. If I run loaddata and give it the path to the >>> file I get: >>> >>> Problem installing fixture './fixtures/initial_data': yaml is not a >>> known serialization format. >>> >>> The docs say yaml is supported. What am I doing wrong? >>> >> >> According to the docs [1], you may need to install PyYAML: >> <http://pypi.python.org/pypi/PyYAML>. >> >> [1] >> <https://docs.djangoproject.com/en/1.4/topics/serialization/#serialization-formats> > > Thanks! Didn't see that.
So my client decided to use xml. I created the file and put it in fixtures/initial_data.xml. On my development machine, which is a Mac, it worked fine - running syncdb loaded the data. But on my client's machine, which is running CentOS, running syncdb did not load the data (it said 'Installed 0 object(s) from 0 fixture(s)'). But when I ran: manage.py loaddata fixtures/initial_data.xml That worked. Anyone have any ideas why sycndb worked on my mashine, but it's not working on theirs? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.