Thanks. I am on it. Info below for future readers.
What I did was:
1) set the order of the upload file handing in the settings.py so that
default behavior in Django will always be to save the file to drive
instead of keeping it in memory (for files under 2.5M)
FILE_UPLOAD_HANDLERS = (
'django.core.files.uploadhandler.TemporaryFileUploadHandler',
'django.core.files.uploadhandler.MemoryFileUploadHandler',
)
2) in my post upload routine, I opened the file using Python's CSV
manipulation library.
import csv
fname = uploaded_data_file.temporary_file_path()
f = csv.reader(open(fname, 'rb'), delimiter=',', quotechar='"')
for line in f:
co_id = line[0]
co_name = line[1]
co_addr1 = line[2]
and so forth.
On Aug 5, 4:01 pm, Subhranath Chunder <
subhran...@gmail.com> wrote:
> Using the string split on CSV like this is bad in practice. Prefer using CSV
> manipulation library instead. Like,
http://docs.python.org/library/csv.html
>
> You can use the CSV reader module for your purpose.
>