[web2py] Re: Parent - Child (multiple rows / grid) form development

2017-07-13 Thread Ramesh Meda
Peter, I really appreciate members of this group being active and willing to help. Peter, everybody is learning, at different levels. Thank you for helping and look forward to your support in future. Regards, Ramesh On Thursday, July 13, 2017 at 6:32:50 AM UTC+5:30, Peter wrote: > > >

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread lyn2py
Anthony, pls see https://groups.google.com/d/msg/web2py/h4b4xz2NzNM/QHSoRfrcCAAJ If we put double quotes on the table name, which happens to not be there for *aggregates* and *distinct* then the sql query will work. On Friday, July 14, 2017 at 5:43:57 AM UTC+8, Anthony wrote: > > Are you

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread lyn2py
Thank you Anthony. I always appreciate your input. I recall using the aggregates max() and count() before and they worked fine following the book. That was quite long ago. However, this time, I did not try on the "old" web2py version. I upgraded to 2.15.1 and continued to code in it. Using

[web2py] Re: form validation based on value on another form field

2017-07-13 Thread 黄祥
yes, thanks for the hints lionel, the show_if works, but the requires part that depend on another form field is still not work. no error occured, but the form validation is not work. i've create another simple webapp too but still got the same (before use is_in_db() that refer to another table,

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Dave S
On Thursday, July 13, 2017 at 2:43:57 PM UTC-7, Anthony wrote: > > Are you saying that used to work but doesn't any longer? > > There are 3 examples in the book at the link. They work in 2.14.6 using -S (and I did cut-n-paste to check). > How about db(db.table).select(max)? > > Anthony >

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread lyn2py
Thank you Leonel, I actually have a very complex query, and it ran into the error I mentioned. In my query I have: db(query).select(other_fields, aggregate, groupby=...etc..., orderby=...etc ...) and I ran into the error. So I tried to identify if it was my complex query throwing the error, my

Re: [web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread lyn2py
No I am not using the rname feature On Friday, July 14, 2017 at 2:26:57 AM UTC+8, Richard wrote: > > Are you using rname feature? > > If so, the issue may need to be further investigate as why SELECT DISTINCT > ON (TABLE_of_sites.title) is not double quoted and all the other table_name > and

[web2py] Re: form validation based on value on another form field

2017-07-13 Thread Leonel Câmara
That should work. Your show_if is the only thing wrong there, it should be: *db.test.field1.show_if = (db.test.field0 == 4)* -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Leonel Câmara
Note this is deprecated: row = db().select(max) Calling db() like that without a query will break common filters for instance. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] form validation based on value on another form field

2017-07-13 Thread 黄祥
is it possible to validate form based on value on another form field? *e.g.* *controllers/default.py* def test(): * if request.vars.field0 == 4:* * #if request.post_vars.field0 == 4:* * db.test.field1.requires = IS_IN_DB(db, db.field1.id, db.field1._format)* * else:* * db.test.field1.requires =

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Anthony
Are you saying that used to work but doesn't any longer? How about db(db.table).select(max)? Anthony On Thursday, July 13, 2017 at 1:16:31 PM UTC-4, lyn2py wrote: > > I'm using a simple query to get aggregate: > > max = db.table.date.max() > row = db().select(max) > > Just following the example

[web2py] Re: How to connect to a remote mysql server?

2017-07-13 Thread Jim S
Is the MySQL server set to accept connections from remote systems? By default it will reject all connections except from the host where it is installed. -Jim On Thursday, July 13, 2017 at 12:04:06 PM UTC-5, Kritika wrote: > > How to connect to a remote mysql server in web2py? > I tried this:

[web2py] Re: hello

2017-07-13 Thread Dave S
On Thursday, July 13, 2017 at 1:04:17 PM UTC-7, Marlysson Silva wrote: > > To handle with databases use the PyDal. > For an easy example, look at For deeper explanation and more examples:

Re: [web2py] web2py 2.15.1 is OUT

2017-07-13 Thread Dave S
On Tuesday, July 11, 2017 at 12:39:04 PM UTC-7, Massimo Di Pierro wrote: > > The one released yesterday is 2.15.1. The next one will be 2.15.2. (2.16.2 > was a typo). > Are the book pull requests to be included? There were a couple of issues. /dps > > On Tuesday, 11 July 2017 11:11:58

[web2py] Re: hello

2017-07-13 Thread Marlysson Silva
To handle with databases use the PyDal. Em quinta-feira, 13 de julho de 2017 14:04:09 UTC-3, Navaf escreveu: > > hello, i'm new in Python. > > sorry with my grematic , my natal idiome is Spanish > i'm worked in JAVA, C# EntityFramework ASP.NET, Mysql , Sql server > and firebase > > i have

Re: [web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Richard Vézina
Are you using rname feature? If so, the issue may need to be further investigate as why SELECT DISTINCT ON (TABLE_of_sites.title) is not double quoted and all the other table_name and field instance are... So maybe the flaw is somewhere in the escaping related to rname feature... Richard On

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread lyn2py
Following this lead https://stackoverflow.com/questions/34708963/error-missing-from-clause-entry-for-table I discovered that if we add double quotes to the tablename, for all instances of the tablename, like this: "TABLE_of_sites" Then the query will work. On Friday, July 14, 2017 at 1:48:10

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread lyn2py
Table code: db.define_table('TABLE_of_sites', Field('site_id', 'reference sites'), Field('title', 'string'), Field('date','datetime'), ... Field('updated','datetime', update=request.now, writable=False), format='%(site_id)s' ) In controller: table = db['TABLE_of_sites'] rows =

Re: [web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread lyn2py
Here it is... db.define_table('TABLE_of_sites', Field('site_id', 'reference sites'), Field('title', 'string'), Field('date','datetime'), ... Field('updated','datetime', update=request.now, writable=False), format='%(site_id)s' ) There are multiple entries for a particular title, so I want to

Re: [web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Richard Vézina
@lyn2py, seems more a issue with naming in your model than anything else... Can you show us your model? On Thu, Jul 13, 2017 at 1:16 PM, lyn2py wrote: > I'm using a simple query to get aggregate: > > max = db.table.date.max() > row = db().select(max) > > Just following the

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread lyn2py
I'm using a simple query to get aggregate: max = db.table.date.max() row = db().select(max) Just following the example here http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#sum-avg-min-max-and-len But I ran into this error: Traceback (most recent call last):

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Anthony
On Thursday, July 13, 2017 at 1:03:31 PM UTC-4, Massimo Di Pierro wrote: > > @Anthony, > > could you provide a simple example? > model: db.define_table('mytable', Field('name'), Field('photo', 'upload')) controller: def main_page(): return dict() def form_component(): return

[web2py] Re: Grails for web2py - anyone interested ?

2017-07-13 Thread Massimo Di Pierro
Actually no. I never looked into Grails. On Thursday, 13 July 2017 02:29:15 UTC-5, pbreit wrote: > > I'm curious what ever happened to this effort? > > Personally I much prefer the CLI-less approach of web2py. I would much > rather just create a file here and there or add a function in a

[web2py] Re: Python compatibility matrix

2017-07-13 Thread Massimo Di Pierro
Let's be clear. Existing applications will never work with Python 3 because they are working with Python 2. People will have to choose whether to use web2py+py2 OR web2py+py3. On Wednesday, 12 July 2017 09:10:39 UTC-5, Leonel Câmara wrote: > > More on this, almost everything should work with

[web2py] CSV files for my ML model on GAE

2017-07-13 Thread Shaud
I am a newbie with GAE and development. I have hosted a small app on Flexible GAE built using Flask framework python. Now I making an ML model for the application which will take some CSV files as an input for the computations. So basically I want to know where should I save those files to

[web2py] How to connect to a remote mysql server?

2017-07-13 Thread Kritika
How to connect to a remote mysql server in web2py? I tried this: db = DAL('mysql://root:password@ipaddress/portal') But got the following error: > OperationalError: (2003, "Can't connect to MySQL server on '10.4.20.61' (113)") Mysql server is on an Ip behind a proxy. --

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Massimo Di Pierro
@Anthony, could you provide a simple example? Massimo On Tuesday, 11 July 2017 15:19:58 UTC-5, Anthony wrote: > > One new feature is that in modern browsers (that support FormData), web2py > Ajax components now support file uploads out of the box (no need for > third-party plugins). > >

[web2py] Re: web2py 2.15.0b1

2017-07-13 Thread Jacinto Parga
Great job. Thanks. First issue with @mobilize import from gluon.contrib.user_agent_parser import mobilize El miércoles, 5 de julio de 2017,

[web2py] Re: Web2py like clone in Java?

2017-07-13 Thread pbreit
Check out https://grails.org/ -- 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] Re: Grails for web2py - anyone interested ?

2017-07-13 Thread pbreit
I'm curious what ever happened to this effort? Personally I much prefer the CLI-less approach of web2py. I would much rather just create a file here and there or add a function in a controller file. You get your default view automatically and then can add a view file when appropriate. But I