[web2py] ignore_field_case

2015-11-14 Thread Annet
In appconfig.ini I have the following setting: ignore_field_case = 1 and in the connection string: ignore_field_case=myconf.take('db.ignore_field_case', cast=lambda value: bool(int(value))) I thought 'Make a Move and 'make a move' in a search field would in this case both return the same

[web2py] Re: Web2py SQLFORM.grid with executesql

2015-11-14 Thread Anthony
> > I stumbled on this: > > https://groups.google.com/forum/#!topic/web2py/b5UMpF-3REI > > > but i didn't really get the solution. > The solution mentioned there is the same as this one on Stack Overflow, which involves creating a view or table in

[web2py] hello all and a minor typo

2015-11-14 Thread noam cohen
Hello web2py'ers I have just started using web2py for a pet project I am working on and like it a lot. My experience is mostly in C++ so I might ask silly questions here :) TYPO in the book: in http://web2py.com/books/default/chapter/29/04/the-core#web2py-Scheduler completed_runs =

[web2py] Re: Finding all rows within x meters of a geoPoint

2015-11-14 Thread Boa
Thanks, Massimo - I believe the Field('loc', 'geometry()') or Field('loc', 'geography()') variant should be correct - that's what the web2py book suggests , and

[web2py] Best way to migrate existing 2.9.11 app to use new css/js from web2py 2.12.3?

2015-11-14 Thread lillian
Hello, I have an existing web2py app and would like to have access to the updated bootstrap/css/js components in the 2.12.3 release. What is the best way to approach this? I tried updating from the admin page, recreating the welcome app, then copied over the new js/css dirs and layout.html

[web2py] redirecting to another page

2015-11-14 Thread sandeep
hii all, how can i redirect from the registration page to another page* instead of login page* after completion of registration. I am using default registration from web2py -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] record representation and lambda

2015-11-14 Thread Anthony Smith
Hi All, I have looking though the group for and answer on this, I am try to get the product_name and batch_no from the product table to be the product in the stock task table. But getting the following traceback: Traceback (most recent call last): File

[web2py] Web2py SQLFORM.grid with executesql

2015-11-14 Thread TYRANISTAR
Hello, I am making a web2py application and I have my two mysql tables defined in my models db.py file: db.define_table('table1', Field('id','integer'), Field('name','string'), migrate=False) db.define_table('table2', Field('id','integer'), Field('name','string'), migrate=False) I want

[web2py] Re: redirecting to another page

2015-11-14 Thread Anthony
On Saturday, November 14, 2015 at 11:38:32 PM UTC-5, sandeep wrote: > > hii all, >how can i redirect from the registration page to another page* instead > of login page* after completion of registration. I am using default > registration from web2py > auth.settings.register_next

[web2py] Re: Best way to migrate existing 2.9.11 app to use new css/js from web2py 2.12.3?

2015-11-14 Thread Anthony
You're going from Bootstrap 2 to Bootstrap 3, which is essentially a different framework with different layout, class names, etc. So, it's just like any switch in front-end UI -- you may have lots of little changes to get your markup to work properly with the new framework. See

[web2py] Too many open files / too many clients

2015-11-14 Thread weheh
Does anyone know how to deal with this situation? I'm running into this Error 24 Too many open files error message that was discussed at least a couple of times here. The ticket is this: 78 Framework IOError: [Errno 24] Too many open files:

[web2py] Re: DAL returns string fields not as unicode strings

2015-11-14 Thread Paolo Valleri
I tried to run the following (test.py) with the latest stable web2py (i.e.: python web2py.py -S welcome -R test.py) db = DAL('sqlite:///tmp/storage.sqlite') db.define_table('unicode_test', Field('test', 'string')) test_val = unicode('på Facebook', 'utf-8') db.unicode_test.insert(test=test_val)

[web2py] Re: ignore_field_case

2015-11-14 Thread Anthony
On Saturday, November 14, 2015 at 3:07:04 AM UTC-5, Annet wrote: > > In appconfig.ini I have the following setting: > > ignore_field_case = 1 > > and in the connection string: > > ignore_field_case=myconf.take('db.ignore_field_case', cast=lambda value: > bool(int(value))) > Note sure if the

[web2py] Re: ajax need to return 4 values

2015-11-14 Thread Paolo Valleri
There isn't a solution out-of-the-box in web2py. I'd suggest returning a json with the 4 values, and then apply the result to the input fields Paolo On Saturday, November 14, 2015 at 1:50:56 PM UTC+1, lucas wrote: > > hello one and all, > > how do i run an ajax function under an onchange of a

[web2py] ajax need to return 4 values

2015-11-14 Thread lucas
hello one and all, how do i run an ajax function under an onchange of a select where the return 4 values will be going to 4 separate other inputs of type text, select, or textarea? thank you in advance, lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Detect worker node vs http request

2015-11-14 Thread Benson Myrtil
Just noticed I don't believe this code works on PC using nssm. the cmd_options.scheduler is still None On Friday, November 6, 2015 at 2:34:20 PM UTC-5, Anthony wrote: > > On Friday, November 6, 2015 at 2:15:33 PM UTC-5, Benson Myrtil wrote: >> >> Is there an easy way to detect if it is a worker

[web2py] Re: ajax need to return 4 values

2015-11-14 Thread Anthony
The third argument to ajax() can be the id of a target element, but it can also be ":eval" or a Javascript function. If you use ":eval", you can return any Javascript code, and it will be eval'ed -- so just generate the code necessary to update the four inputs (e.g., "$('#input1').val(value1);

Re: [web2py] Re: web2py and python3

2015-11-14 Thread António Ramos
weppy looks like a short webp2y environment, however lacks some good documentation like web2py and all of the code samples are very short and errors come often. Seems that the only one helping is the "creator" itself. Unfortunately i dont see it as a good alternative to web2py. At least web2py

[web2py] getting confused when running select on joined tables

2015-11-14 Thread Edward Shave
I'm sorry if all this is in the book but I can't find it.. I never quite know what to expect when selecting records. Does the book make this clear and I missed it. If not what are the criteria that determine the output format? See below where I was initially using a simplified version (row1),

[web2py] Re: getting confused when running select on joined tables

2015-11-14 Thread Anthony
> >>> row2=db((db.entry.acc_id==db.acc.id) and (db.entry.txn_id==1)).select > ().first() > In a DAL query, you must use & rather than and. By using the latter, you are getting the standard Python behavior, whereby x and y simply yeilds y. So, in this case, your query is equivalent to simply