[web2py] Matching iterations of a for loop to field names in a table

2013-04-04 Thread David S
I'm very new to web2py and python in general but have a bit of knowledge when it comes to C/C++. I've got a db setup which needs to pull data from a row in a .csv file and put each column in the .csv into the corresponding column in the db. Rather than doing this explicitly (there's ~40 column

[web2py] Re: Matching iterations of a for loop to field names in a table

2013-04-04 Thread David S
nning Windows NT using proprietary software. Changing the format would require the that company to rewrite part of their software. On Wednesday, April 3, 2013 5:40:01 PM UTC-4, David S wrote: > > I'm very new to web2py and python in general but have a bit of knowledge > when it comes

[web2py] Re: Matching iterations of a for loop to field names in a table

2013-04-04 Thread David S
*dict((colnames[i],v) for i,v in > enumerate(items))) > > It may still fail of the data is not in the right format but you can find > out why. > > On Wednesday, 3 April 2013 16:40:01 UTC-5, David S wrote: >> >> I'm very new to web2py and python in general but have

[web2py] How to merge two tables

2013-04-08 Thread David S
I have three tables, db.table1 db.table2 and db.table3. They are identical except for the information stored in each. table3 is blank and after running some code should contain the combination of the values in table1 and table2. An example ( is generated by web2py_uuid()): db.table1: col1 col

[web2py] Re: How to merge two tables

2013-04-09 Thread David S
any more can be found in the Web2py Manual > here: http://web2py.com/books/default/chapter/29/06. > > On Monday, April 8, 2013 4:29:35 PM UTC-4, David S wrote: >> >> I have three tables, db.table1 db.table2 and db.table3. They are >> identical except for the information st

[web2py] Re: How to merge two tables

2013-04-09 Thread David S
row: row.col8) # optional > > On Monday, 8 April 2013 15:29:35 UTC-5, David S wrote: >> >> I have three tables, db.table1 db.table2 and db.table3. They are >> identical except for the information stored in each. table3 is blank and >> after running some code should contai

[web2py] web2py and paradox databases

2013-04-11 Thread David S
Today I discovered I'll need to read from a paradox database ( http://en.wikipedia.org/wiki/Paradox_%28database%29) and pull some information from it into my application. I cannot change the data source to SQL or another format as doing that would require a complete hardware overhaul to replace

[web2py] Re: web2py and paradox databases

2013-04-19 Thread David S
Update: I decided to keep the solution as easy as possible. I found a command line paradox db converter from here: http://www.dbf2002.com/paradox-converter/index.html and used subprocess.call() to it which converts the paradox db into a .csv. Then I used import_from_csv_file() to get the data.

[web2py] Query doesn't select the proper range

2013-04-25 Thread David S
I've got a query which looks like this: (db.tracking.number >= 0) & (db.tracking.number <= 22000) where number is an integer. And this should select everything with numberbetween 0 and 22000 but it doesn't. For example, if I set the query to just (db.tracking.number >= 0) as expected it grab

[web2py] Re: Query doesn't select the proper range

2013-04-25 Thread David S
I am using SQLite and had changed from string->int so I deleted all of the database files in /myapp/databases and then reloaded all of the data. The issue persisted :( The select generated is correct. I think you're right in saying it's something wrong with the backend. Thanks! David -- --

[web2py] how to dynamically select fields for SQLFORM.grid

2013-04-29 Thread David S
I've got a very nice looking grid from SQLFORM.grid based on my db.items, however it has ~30 columns which can be too much information for the user. I'd like to make it so the fields shown are selectable by the user. So far I've created db.search which stores the user's search history and added

[web2py] Re: how to dynamically select fields for SQLFORM.grid

2013-04-29 Thread David S
day, April 29, 2013 9:42:14 AM UTC-4, David S wrote: > > I've got a very nice looking grid from SQLFORM.grid based on my db.items, > however it has ~30 columns which can be too much information for the user. > I'd like to make it so the fields shown are selectable by

[web2py] A more concise way to update or insert?

2013-05-20 Thread David S
I've got some csv files which need to be imported to a table. However the import_from_csv_file function doesn't seem to work because the files can (and almost always do) contain errors and to the best of my knowledge that function cannot fix errors on the fly. Anyway, I decided to write my own

[web2py] Re: A more concise way to update or insert?

2013-05-20 Thread David S
ng problems with > updates ? > just pass only the columns you need to update to the update_or_insert > statement > > On Monday, May 20, 2013 5:41:11 PM UTC+2, David S wrote: >> >> I've got some csv files which need to be imported to a table. However the >> impo

[web2py] web2py as service can't access locally mounted network folder

2013-07-08 Thread David S
I'm running web2py 2.4.5 (yes I know I need to upgrade) on a network server. For ease of installation I've chosen to deploy my application as a service. It's been working great until now. Some of the data my app needs is located on a network folder, so I mapped the folder to the U:\ drive. I sh

[web2py] online web2py book inaccessible

2013-07-23 Thread David S
It seems the online web2py book (http://web2py.com/book) isn't working for me and is giving an unknown error. Is anyone seeing this issue? David -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop rec

Re: [web2py] online web2py book inaccessible

2013-07-24 Thread David S
Everything seems to work. Thanks! On Wednesday, July 24, 2013 4:28:38 AM UTC-4, Massimo Di Pierro wrote: > > I was doing an upgrade. Can you confirm everything is ok now? > > On Tuesday, 23 July 2013 12:15:42 UTC-5, Jonathan Lundell wrote: >> >> On 23 Jul 2013, at