This hasn't been tested, but so far I really like what I wrote:

http://dpaste.com/hold/577295/
http://dpaste.com/hold/577299/


The code might be missing a few imports, as I copy-pasted and removed a few
tidbits for the sake of simplicity. I'm thinking of packaging into an app
one of these days, or maybe write a wiki post.


Have fun.


Cheers,
AT

On Sun, Jul 24, 2011 at 11:48 PM, Jian Chang <changjia...@gmail.com> wrote:

> Using copy_from is easy to solve it. And if you want to a get a speical
> format file from that csv, use a scirpt to handle it.
> http://www.initd.org/psycopg/docs/cursor.html#cursor.copy_from
>
> 2011/7/25 nixlists <nixmli...@gmail.com>
>
>> On Sun, Jul 24, 2011 at 2:46 PM, Jarilyn Hernandez
>> <jary.hernan...@gmail.com> wrote:
>> > Hi, Thanks for the response. My problem is that I have my tables created
>> on
>> > django. All I want is to import some data from a csv file to these
>> tables
>>
>> I am using HeidiSQL with MySQL for this, but a script could do much
>> more than simple single table loads.
>>
>> --
>> 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.
>>
>>
>  --
> 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.
>

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