[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Simon Ashley
Failing any other replies, this is what we do: 1. copy the file to the server (read then write; we get the files first and store them natively, outside a db, for later batch processing ) 2. use ElementTree to parse the file to get a decent dict 3. use the dict in a bulk_insert into

[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Brando
Simon, could you share your code or possibly provide a w2p app? Thanks for the reply. On Friday, December 27, 2013 3:29:51 AM UTC-8, Simon Ashley wrote: > > Failing any other replies, this is what we do: > >1. copy the file to the server (read then write; we get the files >first and s

[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Simon Ashley
A little difficult to share to code (done for a client, its similar and but not exactly what you're doing i.e. maybe a lot more complicated than what you need), but I think you're almost there. You need to upload the files to the server, then parse them to get each dict. My understanding is

[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Brando
I think i'm pretty close to understanding. I still have a few questions here: *1. You need to upload the files to the server, then parse them to get each dict. * The code I have to generate my dictionaries follows this format (let's assume there are 3 different config formats): parse.config_

[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Simon Ashley
1. We just do it in the controller as a function . Try an .insert but .bulk_insert should be fine for individual records. 2. You may need a path to find the file. Following code is cut, pasted and sanitised from a working controller. (for illustration only) ## initiates getting fil

[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-29 Thread Brando
Simon, this is helpful. Thank you. On Friday, December 27, 2013 8:24:27 PM UTC-8, Simon Ashley wrote: > > >1. We just do it in the controller as a function . Try an .insert but >.bulk_insert should be fine for individual records. >2. You may need a path to find the file. > > Fo