Re: Massive import in Django database

2014-06-11 Thread Erik Cederstrand
Den 11/06/2014 kl. 15.14 skrev John Carlo : > Hello everybody, > > I've fallen in love with Django two years ago and I've been using it for my > job projects. In the past I found very useful information in this group, so a > big thank you guys! > > I have a little doubt. > I have to import in

Re: Re: Massive import in Django database

2014-06-11 Thread moqianc...@gmail.com
Hi, John: Sorry! The pseudo code write by me is not correct, and It's slow.. I will come back tonight. With Regards, Qiancong,Mo From: moqianc...@gmail.com Date: 2014-06-11 23:47 To: django-users Subject: Re: Massive import in Django database Hi, John: I think your code is right, e

Re: Massive import in Django database

2014-06-11 Thread moqianc...@gmail.com
Hi, John: I think your code is right, except "Doc.object" should be "Doc.objects"; The following pseudo code maybe fater than what you write: doc_map = {} for each xml: extract from the xml data -> mydoc_code, mydoc_text, myRelated_doc_codes doc = Doc.objects.create(doc_code=mydoc_code, doc_text=