heya,
The sample code request was just me being lazy =). Hmm, so you think
the csv parsing code should be in the upload processing? This would
just be a form with two boxes for the user to select the .csv files,
and an upload button. Better putting it here than in the model?
In terms of
Hey Victor,
I did the django-batchimport mentioned earlier. I think it will
address your need but is definitely aimed at XLS. However, it does
already handle duplicates (it will either update them or ignore them
based on setting). You can also specify a subset of model fields to
use to determine
On 06.01-16:55, Victor Hooi wrote:
[ ... ]
> Valts, thanks for the reply - that looks interesting, and is similar
> in some ways to what I want - definitely going to check out the code.
> Basically, I just wanted a simple file-upload form, for the user to
> upload the two .CSV files. Then,
Hello,
If the file handling job is not too hard I would put the functionality in
model. Actually it depends on complexity, use cases and taste.
You can try writing the sample code by yourself :)
--
Valts
On Wed, Jan 7, 2009 at 02:55, Victor Hooi wrote:
>
> heya,
>
>
heya,
Whoops...forgot. I'm also confused on the recommended way to deal with
duplicates? (not duplicate .csv files, but duplicate entries, perhaps
in two different ones.). Just do a plain search for each entry? Or is
there a better way?
On Jan 7, 11:55 am, Victor Hooi
heya,
Valts, thanks for the reply - that looks interesting, and is similar
in some ways to what I want - definitely going to check out the code.
Basically, I just wanted a simple file-upload form, for the user to
upload the two .CSV files. Then, there's quite a bit of processing to
do on the two
Hello,
Maybe this app could be helpful for you:
http://code.google.com/p/django-batchimport/
If you have to import lots of data I would suggest creating python script
that reads the files and inserts the data in database either using Django
ORM or plain SQL. In case of hundreds of thousands of
heya,
This question might seem a bit simple, but what's the best way to
instantiate models from .csv files?
Essentially, I have two .csv files. One contains a list of people, and
their access rights (one-to-many). The second .csv file contains a log
of doorway access (just a bunch of sequential
8 matches
Mail list logo