Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Create table and load data

Received: by 10.224.70.131 with SMTP id d3mr3106529qaj.0.1350065394262;
        Fri, 12 Oct 2012 11:09:54 -0700 (PDT)
X-BeenThere: django-users@googlegroups.com
Received: by 10.224.201.194 with SMTP id fb2ls6401465qab.3.gmail; Fri, 12 Oct
 2012 11:09:10 -0700 (PDT)
Received: by 10.224.31.20 with SMTP id w20mr3096538qac.2.1350065350674;
        Fri, 12 Oct 2012 11:09:10 -0700 (PDT)
Received: by 10.224.31.20 with SMTP id w20mr3096537qac.2.1350065350664;
        Fri, 12 Oct 2012 11:09:10 -0700 (PDT)
Return-Path: <larry.mart...@gmail.com>
Received: from mail-qa0-f43.google.com (mail-qa0-f43.google.com [209.85.216.43])
        by gmr-mx.google.com with ESMTPS id f17si1664755qck.1.2012.10.12.11.09.10
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 12 Oct 2012 11:09:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of larry.mart...@gmail.com designates 209.85.216.43 as permitted sender) client-ip=209.85.216.43;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of larry.mart...@gmail.com designates 209.85.216.43 as permitted sender) smtp.mail=larry.mart...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-qa0-f43.google.com with SMTP id k1so67198qaf.2
        for <django-users@googlegroups.com>; Fri, 12 Oct 2012 11:09:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=IDX88NN3SbelPaLEf/DSZ687jqB1bnddtQLcGojbhFY=;
        b=NSup1nZn/C+6YGI5j1mI6/pIYWCV6WruSLZ8PFmVLKDygr97dhd54vS5gk4PXioTWt
         3MVYIEq9ur8fVvjFhoLq1o5BSoMKVxl/BkxL9jLoXEEMo2nZ7mMHJU1lZUO/JWFLKnjR
         eQ9HZLwywR7nb0Groi8ZragYzXqj30vt4DKd6T9ny+W5AwUPoAMQTXmzqLSyYNUho2Yw
         nrLWHNAiP5Ittl9SN1OwtU6MCaoe9oFghYd2TUa/nukiC2xp5PNBif+2ZvlgULG+i96G
         dHi8Kv39N8bEoUOzjc/SPg7i+Lcafg6DPk3va44AU319GIX04ch8tR1edbFZfFZMBbhU
         QRJQ==
MIME-Version: 1.0
Received: by 10.224.111.16 with SMTP id q16mr8689210qap.19.1350065350313; Fri,
 12 Oct 2012 11:09:10 -0700 (PDT)
Received: by 10.49.71.33 with HTTP; Fri, 12 Oct 2012 11:09:10 -0700 (PDT)
In-Reply-To: <CACwCsY7JfOxQo0NNAXRic=8YruO+Je9LquSNtiDJRQALUWu...@mail.gmail.com>
References: <CACwCsY4cLMDabayWKRaGBvx6+g_L_58hL6TTOENxyp5rhxV...@mail.gmail.com>
	<CAPMFOb5GQSSVgaa2NJc_miDTPpiQt-oRjFqcJcevG00nBTd...@mail.gmail.com>
	<CACwCsY5kqYMx+gpxfL5owprPSEhzJ=7T82=mbJByVL16c8K...@mail.gmail.com>
	<CAPMFOb7+y5VYsBKVvkSMcqgYqK3Px83oF9+GoK471JWKhjg...@mail.gmail.com>
	<CACwCsY5Ge7aM0HA+1V0U7qnL-7RTd0yXYZ6DeCypw9GgH8i...@mail.gmail.com>
	<CAOXm+p_BXXW2xw_Ec_xh0yLzXS-pFz64tdQAx6Az6THM44A...@mail.gmail.com>
	<CACwCsY7JfOxQo0NNAXRic=8YruO+Je9LquSNtiDJRQALUWu...@mail.gmail.com>
Date: Fri, 12 Oct 2012 12:09:10 -0600
Message-ID: <CACwCsY6Z=ykOM5PT=eurO4qjfirT83xD5j9V2WRE45GwowS...@mail.gmail.com>
Subject: Re: Create table and load data
From: Larry Martell <larry.mart...@gmail.com>
To: django-users@googlegroups.com
Content-Type: text/plain; charset=UTF-8

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?