Re: Create table and load data

2012-10-13 Thread Larry Martell
I didn't even need to use the debugger. I just ran with --verbosity 3, and it showed me all the places it looked for fixtures files. Strangely, it did not look for a fixtures dir immediately off my app's main dir, but it looked for one everywhere else. My app is called motor, and it lives in /usr/l

Re: Create table and load data

2012-10-13 Thread Larry Martell
Thanks Kurtis. That's will save me a bit of time. I'm going to dig into it now. I'll let you know what I find. On Fri, Oct 12, 2012 at 2:25 PM, Kurtis Mullins wrote: > Whoops, sorry that was the master branch. Here you go: > https://github.com/django/django/blob/1.4.1/django/core/management/comma

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
Whoops, sorry that was the master branch. Here you go: https://github.com/django/django/blob/1.4.1/django/core/management/commands/syncdb.py On Fri, Oct 12, 2012 at 4:24 PM, Kurtis Mullins wrote: > Good luck to you! The code is here if you want to start crawling through > it for a good point to p

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
Good luck to you! The code is here if you want to start crawling through it for a good point to place a breakpoint: https://github.com/django/django/blob/master/django/core/management/commands/syncdb.py On Fri, Oct 12, 2012 at 3:30 PM, Larry Martell wrote: > On Fri, Oct 12, 2012 at 12:22 PM, Kurt

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Fri, Oct 12, 2012 at 12:22 PM, Kurtis Mullins wrote: > On Fri, Oct 12, 2012 at 2:09 PM, Larry Martell > wrote: >> >> >> 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

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
On Fri, Oct 12, 2012 at 2:09 PM, Larry Martell wrote: > > > 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 Cen

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Thu, Oct 11, 2012 at 4:51 AM, Larry Martell wrote: > On Thu, Oct 11, 2012 at 1:37 AM, Joseph Wayodi wrote: >> On Thu, Oct 11, 2012 at 2:23 AM, Larry Martell >> wrote: >>> I'm having trouble getting django to read my fixture file. I created it in >>> yaml: >>> >>> - model: cdsem.fields >>>

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Fri, Oct 12, 2012 at 3:44 AM, wrote: > Hi Larry, > Do you have PyYAML installed? If not install it first and retry or > alternatively you could just serialize your fixture in (my personal favorite) > JSON. The client decide to use XML. -- You received this message because you are subscrib

Re: Create table and load data

2012-10-12 Thread bb6xt
Hi Larry, Do you have PyYAML installed? If not install it first and retry or alternatively you could just serialize your fixture in (my personal favorite) JSON. Cheers! Abraham. -- Sent from my mobile device -- You received this message because you are subscribed to the

Re: Create table and load data

2012-10-11 Thread Larry Martell
On Thu, Oct 11, 2012 at 1:37 AM, Joseph Wayodi wrote: > On Thu, Oct 11, 2012 at 2:23 AM, Larry Martell > 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 >> descrip

Re: Create table and load data

2012-10-11 Thread Joseph Wayodi
On Thu, Oct 11, 2012 at 2:23 AM, Larry Martell 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: >

Re: Create table and load data

2012-10-10 Thread Larry Martell
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 c

Re: Create table and load data

2012-10-04 Thread Jonathan Baker
You're welcome. Personally, I've found it's easiest to get the JSON formatted correctly by creating the model, syncing the DB, inserting some dummy records, running 'dumpdata' against the table, and then

Re: Create table and load data

2012-10-04 Thread Larry Martell
Thanks! I knew there had to be a way! On Thu, Oct 4, 2012 at 10:28 AM, Jonathan Baker wrote: > initial_data sounds like what you're looking for: > https://docs.djangoproject.com/en/dev/howto/initial-data/ > > On Thu, Oct 4, 2012 at 10:26 AM, Larry Martell > wrote: >> >> Is there some way to use

Re: Create table and load data

2012-10-04 Thread Jonathan Baker
initial_data sounds like what you're looking for: https://docs.djangoproject.com/en/dev/howto/initial-data/ On Thu, Oct 4, 2012 at 10:26 AM, Larry Martell wrote: > Is there some way to use manage.py to create a table and load data > into it (where the data is contained in the models.py)? > > I ha

Create table and load data

2012-10-04 Thread Larry Martell
Is there some way to use manage.py to create a table and load data into it (where the data is contained in the models.py)? I have a client that wants to have some data contained in the code (so it's part of the code repository), and when they do the initial syncdb, have that data loaded into one o