[web2py] Re: web2py down after adding a table in db.py

2013-06-11 Thread Rocco
Ok, I solved using fake_migrate_all=True Thanks to Angelo, who helped me :) -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegr

[web2py] web2py down after adding a table in db.py

2013-06-11 Thread Rocco
Dear all, it's more than a year that I'm using web2py to develop scientific application for marine acoustic data analysis and stock assessment. For many years I used LAMP and moving to web2py has been very exciting. I saved a lot of developing time, and the products are better in look and usab

[web2py] Re: Bulk insert: how to improve performances?

2013-05-20 Thread Rocco
Many thanks, Niphlod! -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.co

[web2py] Bulk insert: how to improve performances?

2013-05-20 Thread Rocco
Dear all, I've a loop to insert about 2K records into a postgres database (running on same host). This is the used code: for row in cnv.data_matrix: sensor_n=0 for element in row: db.CTD_DATA.insert(CTD_STATION_ID=stationid,SENSOR= sen

[web2py] cpdb.py not working...

2013-04-24 Thread Rocco
abase 'NoneType' object is not iterable The folder application/sviluppo/databases exists and it is not empy I also tryed to save to sqlite ( -Y 'sqlite://storage.sqlite') with same failure. Any suggestions? Thanks, Rocco -- --- You received this message because you are subs

[web2py] JSON and COUNT: avoid _extra field?

2013-03-28 Thread Rocco
Hello, I'm doing some exciting test using jqplot and handsontable with web2py. The approach is almost linear: controller with db(...).select(...).as_list() -> @service.json -> $.getJSON But I've a problem using a count field, that produce a JSON output with a _extra field: Controller: @s

[web2py] app design page takes a long time to load

2013-03-15 Thread Rocco
%MEMTIME+ COMMAND 3511 rocco 20 0 1266m 321m 2624 S 104 8.2 54:44.70 python I tried to restart web2py, but with same results. Any way to perform a debug? Any suggestions? Thanks in advance for your reply, Rocco -- --- You received this message because you are subsc

[web2py] Re: Multiple or in where clause using dal

2012-12-19 Thread Rocco
Thank you! Il giorno mercoledì 19 dicembre 2012 10:41:33 UTC+1, Niphlod ha scritto: > > db(db.table.id.belongs(myset)).select() > > >> --

[web2py] Multiple or in where clause using dal

2012-12-19 Thread Rocco
Dear all, I need to extract multiple records from a table, the number of selected records is variable (from 1 to hundreds). The user form returns a list of selected ids, f.e.: myset=[1,15,22,44,56] In the raw sql way, I used a for loop to generate the where clause of the sql statement, to get

[web2py] Re: DAL and "Pivot Tables"

2012-11-10 Thread Rocco
I found a solution, I don't know if it is the good one, but works enough for me. My real data structure is slightly different about the above example: db.define_table('ctd', Field('station'), Field('parameter'), Field('value','integer')) It contains oceanographic information about s

[web2py] Pivot tables using DAL?

2012-11-09 Thread Rocco
Dear All, I have defined this model: db.define_table('fruits_in_shop', Field('shop_name'), Field('species'), Field('number','integer')) With this kind of record inside: fruits_in_shop.id fruits_in_shop.shop_na

[web2py] DAL and "Pivot Tables"

2012-11-09 Thread Rocco
(I already post this question, but it was deleted in few seconds and no reason was mentioned. I try to repost it, removing formatting and external links... If something is wrong, please inform me :) I have defined this model: db.define_table('fruits_in_shop', Field('shop_name'), Field('

[web2py] Re: SQLFORM: change field value after/in update

2011-11-26 Thread Rocco De Marco
On 26 Nov, 18:50, Massimo Di Pierro wrote: > I THINK YOU WANT: > > def update_mytable(): >     record=request.args[0] >     form=SQLFORM(db.timbrata, >                      record, deletable=False) >     form.process(onaccept=lambda form: ( \ >             auth.archive(form), >             form.

[web2py] Re: SQLFORM: change field value after/in update

2011-11-26 Thread Rocco De Marco
On 26 Nov, 18:06, Anthony wrote: > On Saturday, November 26, 2011 11:40:27 AM UTC-5, Rocco De Marco wrote: > > > db.mytable.field2.requires = IS_IN_SET(['option1'],['option2']) > > I think you want: > > IS_IN_SET(['option1', 'optio

[web2py] SQLFORM: change field value after/in update

2011-11-26 Thread Rocco De Marco
return dict (form=form) But the filed2 is updated just when the form is showed, not, as I expected, after an update. Maybe I took a wrong way, someone could help? Regards, Rocco