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<https://docs.djangoproject.com/en/dev/ref/django-admin/#dumpdata-appname-appname-appname-model>' against the table, and then copying the printed JSON into initial_data.json so that next time you build your data is all there.
On Thu, Oct 4, 2012 at 10:31 AM, Larry Martell <[email protected]>wrote: > Thanks! I knew there had to be a way! > > On Thu, Oct 4, 2012 at 10:28 AM, Jonathan Baker > <[email protected]> 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 <[email protected]> > > 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 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 of the tables. Is anything like > >> this supported in django? > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Django users" group. > >> To post to this group, send email to [email protected]. > >> To unsubscribe from this group, send email to > >> [email protected]. > >> For more options, visit this group at > >> http://groups.google.com/group/django-users?hl=en. > >> > > > > > > > > -- > > Jonathan D. Baker > > Developer > > http://jonathandbaker.com > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > > http://groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Jonathan D. Baker Developer http://jonathandbaker.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

