[web2py] Re: Debug Web2py with Wing IDE

2014-06-27 Thread Massimo Di Pierro
None of them web2py loads and exec's modes and controller codes at every request. Not sure that qualifies as code realoding. We do not do what Django does because that only works when you use the built-in web server and not in production with, for example, nginx. Massimo On Wednesday, 25 June

[web2py] Re: Inserting to database after submit

2014-06-27 Thread Massimo Di Pierro
Did you do form = SQLFORM(...).process()? On Thursday, 26 June 2014 11:12:29 UTC-5, haj...@byteplus.com.ng wrote: Hello, I am new to web2py. I am running this application , my form was produced using SQLFORM. I noticed after i click submit the data don't get inserted into the database.

[web2py] Re: SQLFORM cannot save to database

2014-06-27 Thread Massimo Di Pierro
this: FORM.accepts(form, request.vars): should be SQLFORM.accepts(form,request.post_vars, session) or better form.accepts(request.post_vars, session) or eve better form.process() On Thursday, 26 June 2014 18:24:27 UTC-5, haj...@byteplus.com.ng wrote: Pls can someone help

[web2py] Re: Unclear how to create a unique multiple fields on web2py

2014-06-27 Thread Massimo Di Pierro
I would not do it that way. There are two places to enforce uniqueness: at the database level and at the form level. To enforce is at the database level you can manually do create table sometable ( a_field varchar(10), b_field timestamp default date(now()), unique(a_field, b_field)

[web2py] Re: web2py scheduler period and repeats result not expected

2014-06-27 Thread Niphlod
On Thursday, June 26, 2014 11:17:21 PM UTC+2, 黄祥 wrote: yes, followed your step, i understood the logic flow of the web2py scheduler and made it work, thank you so much, simone for the pointers. just wondering, the precision for second is not exact on created_on, tested using period = 5

[web2py] Re: Database query using exclude or Does not contain

2014-06-27 Thread Massimo Di Pierro
~cd.value.contains(filter_value_inc, all=False) ~ = NOT On Thursday, 26 June 2014 09:52:02 UTC-5, Douglas Campbell wrote: Hello, I am trying to filter out specific values in an SQLFORM.grid but I can not figure out how to do this in the Query. Right now I have something like:

[web2py] Re: Error : unable to open database file

2014-06-27 Thread Massimo Di Pierro
Do you have a background process? Do you have multiple web2py's running in the same instance? sqlite is not client server and each instance locks the database. If the database is locked for too long and another process/thread/request tries to access, it may timeout. On Thursday, 26 June 2014

[web2py] Re: web2py scheduler period and repeats result not expected

2014-06-27 Thread 黄祥
a, i understood, the puzzle completed now. thank you so much, simone, for detail explaination about web2py scheduler. thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: SQLFORM cannot save to database

2014-06-27 Thread 黄祥
On Friday, June 27, 2014 1:04:13 PM UTC+7, Massimo Di Pierro wrote: this: FORM.accepts(form, request.vars): should be SQLFORM.accepts(form,request.post_vars, session) or better form.accepts(request.post_vars, session) or eve better form.process() @massimo: what do you

[web2py] Create a database table on submission of a form

2014-06-27 Thread Shubham Jain
I want to create a database table every time a form is submitted. The table name would be a data from a the field of form submitted. I tried to create the table by writing the db.define_table() code in the function in which the form is created (by SQLFORM), under the condition if

[web2py] Re: SQLFORM.grid woes

2014-06-27 Thread hvjunk
On Thursday, June 26, 2014 12:16:01 PM UTC+2, hvjunk wrote: This morning somethings broke... and yes, it *was* me, but I don't know where/what ;( (had too many customers telling me I/we didn't do do nothing and then I showed them what and then they remember something totally

[web2py] NOT IN in web2py DAL

2014-06-27 Thread Fernando Vieira
Hi, how to use NOT IN in web2py DAL example: select usuario from fisico_sip_iax where tecnologia = 'SIP' and usuario NOT IN(select ramal_fisico from f_ramal_virtual); thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Hypermedia API and Collection+JSON in web2py

2014-06-27 Thread Falko Webpgr
So I created a REST API doc plugin for web2py quite a while ago. Here is what it looks like on the user side http://semanticsbml.org/semanticSBML/plugin_restapidoc/index# http://rumo.biologie.hu-berlin.de/pyMantis/plugin_restapidoc/index I also posted the plugin for this on here, a while ago.

[web2py] web2py flash using bootstrap3 alerts and flash status is way to bothersome to implement

2014-06-27 Thread Leonel Câmara
Hey, I wanted to change web2py response.flash to use bootstrap3 alerts. I started by creating an alert-default in my css since bootstrap3 doesn't have one and I wanted it, then I placed this in my layout.html div class={{='flash alert alert-dismissable ' + ('alert-' + (response.flash_status

[web2py] Re: NOT IN in web2py DAL

2014-06-27 Thread Fernando Vieira
Solution ramal_virtual = db(db.f_ramal_virtual)._select(db.f_ramal_virtual.ramal_fisico) db(~db.fisico_sip_iax.usuario.belongs(ramal_virtual)).select(orderby=db.fisico_sip_iax.usuario) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Create a database table on submission of a form

2014-06-27 Thread Leonel Câmara
Why would you want to do this? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups

[web2py] list:strings not working as described or am I missing something?

2014-06-27 Thread Cliff Kachinske
https://lh4.googleusercontent.com/-7k58hj9gv7M/U62UdX1NG4I/AHA/9l6vaRZIxy0/s1600/Screenshot+from+2014-06-27+11%3A56%3A46.png Web2py 2.8.2, if that matters. The manual at web2py.com says, On relational databases they [list:string fields] are mapped into text fields which contain the

[web2py] Beautiful explanation of Blocks in views!

2014-06-27 Thread JoeCodeswell
Dear web2py-users, Kudos to the person that wrote the book section Blocks in views. The use of an illustrative, simple example, oriented toward the web developer was easy to understand and customize in a short amount of time. Thanks very much. Love and peace, Joe -- Resources: -

[web2py] Re: list:strings not working as described or am I missing something?

2014-06-27 Thread Anthony
Hard to say without seeing any code, but clearly the database insert is not getting a list. On Friday, June 27, 2014 12:12:00 PM UTC-4, Cliff Kachinske wrote: https://lh4.googleusercontent.com/-7k58hj9gv7M/U62UdX1NG4I/AHA/9l6vaRZIxy0/s1600/Screenshot+from+2014-06-27+11%3A56%3A46.png

[web2py] Re: web2py flash using bootstrap3 alerts and flash status is way to bothersome to implement

2014-06-27 Thread Niphlod
unfortunately, the main point is that web2py doesn't provide out-of-the-box something that clarifies what a flash status is . passing a status as a new header uses the same tech web2py provides for other things, but since it's not in the core code, your shortcomings are exactly what is needed.

[web2py] Re: list:strings not working as described or am I missing something?

2014-06-27 Thread Cliff Kachinske
Anthony, Thanks for the shove in the right direction. An ajax callback processes that field and I had forgotten to run it through the validator. So the db was inserting the entire string instead of list members. On Friday, June 27, 2014 1:07:33 PM UTC-4, Anthony wrote: Hard to say without

[web2py] Re: SQLFORM cannot save to database

2014-06-27 Thread Massimo Di Pierro
Just simpler. I always use: form.process() On Friday, 27 June 2014 04:52:03 UTC-5, 黄祥 wrote: On Friday, June 27, 2014 1:04:13 PM UTC+7, Massimo Di Pierro wrote: this: FORM.accepts(form, request.vars): should be SQLFORM.accepts(form,request.post_vars, session) or better

[web2py] Re: Create a database table on submission of a form

2014-06-27 Thread Massimo Di Pierro
The problem is not so much creating them but keeping track of them. Here is a possible solution: # a table of tables db.define_table('meta_table',Field('name'),Field('fields','json')) # for each table in meta_table define or create the table: for table db(db.meta_table).select():

Re: [web2py] Create a database table on submission of a form

2014-06-27 Thread Manuele Pesenti
Il 27/06/14 11:25, Shubham Jain ha scritto: I want to create a database table every time a form is submitted. The table name would be a data from a the field of form submitted. I tried to create the table by writing the db.define_table() code in the function in which the form is created

[web2py] Radio widget not working as a Boolean

2014-06-27 Thread Carlos Zenteno
I have the following code in my model augmenting auth_user. auth.settings.extra_fields['auth_user'] = [ Field('is_club_member', 'boolean' , default=False, writable=True, readable=True, label=T('Are you a Club Member?'),

[web2py] Need help to achieve url rewrite

2014-06-27 Thread Lisandro
I have an application called init, the app has a controller called default.py and inside it I have three functions: 1) /init/default/index -- The home of the website. 2) /init/default/contact -- The contact page. 3) /init/default/store This function receives an argument: the slug of the

[web2py] Re: Radio widget not working as a Boolean

2014-06-27 Thread Carlos Zenteno
OK, my IS_IN_SET should be: IS_IN_SET([(True, T('Yes')),(False, T('No'))]) and now the selection shows in the form. Still: - it does not enforce default=False - no matter if I choose Yes or No (True or False), it puts True in db Having a feeling that this does not work with boolean ( a shame)