Hmm, I see your commit; Did you get a confirmation message from your
database that the commit worked?
Perhaps you could try inserting the data via a python script.

import sqlite3
# create/connect to a permanent file database
con = sqlite3.connect("pyfitness2.db")
# establish the cursor, needed to execute the connected db
cur = con.cursor()
cur.execute("INSERT INTO repository_date  etc...... ;")
con.commit()
con.close()

Note that my example is specifically for sqlite.

On Mar 26, 7:42 pm, Daniel Pugh <dcwp...@gmail.com> wrote:
> Forgive if this is totally obvious, but I'm having a bit of trouble
> getting data into my first prototype with django.
>
> I am prototyping an application called repository, syncdb builds my
> tables and all seems to work in the admin interface.
>
> However, I have 600 lines of data I want to use as the seed for my
> main table.  I have a sql file with INSERT commands stored in sql
> folder named after the model (sql/date.sql)
>
> Immediately after running syncdb, I insert the data with either
> <python manage.py sqlall repository> or <python manage.py sqlcustom
> repository>.  This seems to work, it reads through the SQL and ends
> with this:
>
> INSERT INTO repository_date
> (`labno`,`siteno`,`site`,`material`,`materialcomment`,`technique`,`d13`,`rcybp`,`error`,`ref`,`provtype`,`provenience`,`provenience2`,`generalcult`,`taxon`,`comments`)
> VALUES
> ('ISGS-4242','14CM406','','CHG','','CNV','-26.7','430','70','Bevitt
> 1999','','','','','WLM','');
>
> INSERT INTO repository_date
> (`labno`,`siteno`,`site`,`material`,`materialcomment`,`technique`,`d13`,`rcybp`,`error`,`ref`,`provtype`,`provenience`,`provenience2`,`generalcult`,`taxon`,`comments`)
> VALUES
> ('unk','14RH301','','MAZ','','AMS','-25.3','600','40','','','','','','WLM','');
> CREATE INDEX "repository_date_5b0c863a" ON
> "repository_date" ("siteno_id");
> CREATE INDEX "repository_reference_6223029" ON
> "repository_reference" ("site_id");COMMIT;
>
> Problem is that when I try to access these data in the admin interface
> or do dumpdata, nothing is there.  I'm at a loss for why the data
> aren't populating my database.
>
> I appollogize if this is completely obvious, it's my first hack at web
> development and as much as I love it, some things totally mystify my.
>
> Thanks!

-- 
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.

Reply via email to