[web2py] response.js does not execute in the oncreate callback

2017-07-20 Thread Bernardo Leon
Hello, I have a component which has an SQLFORM.grid and an oncreate and ondelete callbacks on which I execute a response.js. When I delete a record the response.js javascript function is executed but when I create a record the response.js javascript function does not get executed (but the

[web2py] Re: web2py 2.15.2 is OUT

2017-07-20 Thread 黄祥
yes, you are right, fake_migrate_all=True in db.py fixed the auth_user table exist's problem and the clone problem didn't appear again thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Page with four LOAD components is too slow

2017-07-20 Thread Bernardo Leon
Yes, the application, redis and the database are in the same server. This server has 512 MB of RAM but I don't think I am using all the ram. I have 48mb free right now. Regarding the code, it just makes simple selects on one or two tables (the querys arent doing anything weird). Do you still

[web2py] Re: Page with four LOAD components is too slow

2017-07-20 Thread Leonel Câmara
That still seems slow actually. Is redis on that same machine or could you have latency issues there too? If it is then it's hard to tell what's causing the slowness now that everything is in the same machine. We would need to know the machine specs and what your code is doing exactly. You may

[web2py] Re: Is a good practice add .table files to source control?

2017-07-20 Thread Leonel Câmara
I don't put the databases folder under source control. This way I can update the in production version without worries. If you two are sharing the same database in development, which I don't do in my team, then the best is for one of you to always have migrations enabled with fake_migrate True

[web2py] Re: web2py 2.15.2 is OUT

2017-07-20 Thread Leonel Câmara
@stifan seems like you need a fake migrate to fix your table files. -- 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

[web2py] Re: web2py deployment strategies

2017-07-20 Thread Alex Glaros
any performance advantage to moving controller files out of default.py into their own file? -- 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

[web2py] Is a good practice add .table files to source control?

2017-07-20 Thread Bernardo Leon
If two developers use git to develop an application and obviously they have their model file on git do they need to have the same .table files? I have a postgresql development database on a digitalocean server and my partner is unable to connect to the database that I created originally even

[web2py] Re: web2py 2.15.2 is OUT

2017-07-20 Thread 黄祥
found another error that the same code run well in previous version (different from reported before) Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File

[web2py] Re: Page with four LOAD components is too slow

2017-07-20 Thread Bernardo Leon
Thank you to both of you. Anthony I was using redis to handle my sessions hence I can discard that bottleneck besides I need the session info on my components. It seems that web2py performs more querys to the database than expected. I have the database on digitalocean but was using web2py on

[web2py] Re: [DAL] AttributeError: 'Expression' object has no attribute 'tablename'

2017-07-20 Thread Massimo Di Pierro
Please open a ticket about this. This is a serious bug with the DAL rewrite. We will fix it asap. On Thursday, 20 July 2017 00:20:44 UTC-5, lyn2py wrote: > > How do I resolve this error? > > Traceback (most recent call last): > File "/Users/web2py/web2py/gluon/restricted.py", line 219, in

[web2py] Re: After update can't connect Oracle

2017-07-20 Thread Massimo Di Pierro
Thanks for checking the fix. Will merge the PR asap. On Wednesday, 19 July 2017 08:47:38 UTC-5, Вячеслав Анатольевич wrote: > > In web2py 2.15.2 > - error not > fixed... I fixed myself but: > > File

[web2py] Re: how to optimize this query to get ids like [100,200,102,909] not [{'id':100,'id':200...}

2017-07-20 Thread Massimo Di Pierro
Unfortunately while this is possible, it is very inefficient. It is still creating all the intermediate objects and discarding them. It may consume CPU and RAM. You want this: db(db.entities.type==5).select(db.entities.id, processor=lambda *a,**b:[i[0] for i in a[0]]) This is as fast as it

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-20 Thread Massimo Di Pierro
Can you confirm all is good now with 2.15.2? Thanks to you and Leonel for looking into this so quickly. On Sunday, 16 July 2017 21:34:40 UTC-5, Joe Barnhart wrote: > > Yes that fix looks exactly on point. > > -- Joe > > On Sunday, July 16, 2017 at 3:28:22 PM UTC-7, Leonel Câmara wrote: >> >> Joe

[web2py] Re: AttributeError: 'SQLite' object has no attribute 'file_open'

2017-07-20 Thread Massimo Di Pierro
Can you please open a PyDAL ticket so we can track. This should work. On Saturday, 15 July 2017 05:13:45 UTC-5, Jitun John wrote: > > Here is a Code that worked fine on 2.14.6 but doesn't on 2.15.1 > > > import datetime > import gc > import os > from gluon import * > from current_config import *

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

2017-07-20 Thread Massimo Di Pierro
That is absolutely correct. I learned a lot from Rails. I always found it more user friendly than Django but also slower. On Saturday, 15 July 2017 04:00:36 UTC-5, Joe Barnhart wrote: > > But Grails borrowed heavily from Rails. And you, Massimo, mentioned that > Rails also provided some

[web2py] Re: How to handle web2py_websocket connection lost

2017-07-20 Thread Massimo Di Pierro
Client-side you can use https://github.com/joewalnes/reconnecting-websocket On Friday, 14 July 2017 08:23:32 UTC-5, Ramos wrote: > > Hello > how do i handle connection loss with websockets ? > > I´m using > > if(!web2py_websocket( > > so how do i code in the event of connection loss? > >

[web2py] Problems with GAE 1.9.57 and py2web 2.15.2-stable (SyntaxError: Adapter not found for gae)

2017-07-20 Thread latakant
Hi! py2web 2.15.2-stable doesn't seems to work properly with GAE 1.9.57 in Ubuntu 16.04. After running py2web in GAE, I am able to load first page, but after selecting e.g. admin, I get this error in console: " ERROR2017-07-20 10:07:09,287 restricted.py:174] Traceback (most recent call

[web2py] Re: CSV files for my ML model on GAE

2017-07-20 Thread Massimo Di Pierro
You can put CSV files and upload them with the app but you will run into issue. The issue is the appengine limits the number of files and the file size. I would recommend using Cloud Storage. It is the cheapest solution and easy to use. On Thursday, 13 July 2017 12:04:06 UTC-5, Shaud wrote: >

[web2py] python Help with classes

2017-07-20 Thread António Ramos
hello i tested this simple code outside web2py class a(): def a1(self): temp=getattr(eval("b")(), "b1")('testing result') return temp class b(): def b1(self,param): * s=somevar2.somesubvar1* return param print a().a1() if i remove

[web2py] Re: web2py deployment strategies

2017-07-20 Thread Anthony
On Thursday, July 20, 2017 at 2:45:09 PM UTC-4, Alex Glaros wrote: > Jim, regarding "That said, if you've got 500 tables in your app, you probably > don't want to use the web2py default table instantiation on every request." > > > 1. did you mean to put db.py model tables into categorized sub

Re: [web2py] Re: web2py deployment strategies

2017-07-20 Thread Jim Steil
Yes, the goal is to only load the table definitions that you need. http://web2py.com/books/default/chapter/29/04#markmin_conditional_models we use a form of conditional models along with lazy tables ->

[web2py] Re: web2py deployment strategies

2017-07-20 Thread Alex Glaros
Jim, regarding "That said, if you've got 500 tables in your app, you probably don't want to use the web2py default table instantiation on every request." 1. did you mean to put db.py model tables into categorized sub tables - e.g., accounting_related_tables.py, email_related_tables.py,

Re: [web2py] Re: web2py deployment strategies

2017-07-20 Thread Jim Steil
Our redis server only has 8GB of ram. We load balance primarily for redundancy, not load. We only have about 100 users actively using our system. It is an internal app for our business. -Jim On Thu, Jul 20, 2017 at 11:46 AM, Chinh Dang wrote: > Our app starts small

Re: [web2py] Re: web2py deployment strategies

2017-07-20 Thread Chinh Dang
Our app starts small maybe around 50 tables max, but may grow as more features are being added. Planning to use load balancing and failover. Since you use redis, can you give me a ballpark on the memory usage for the amount of traffic you have? My concern is when the redis host runs out of memory.

[web2py] How to create formstyle with tabs for smartgrid edit, new, view forms

2017-07-20 Thread icodk
Not sure this is the right place. Hope it can be useful for others. Editing tables with many fields in a new, edit forms of a SQLFORM.smartgrid can be difficult because all fields comes in a long list in the same order as in the table definition. The attached simple application is a demo

[web2py] Re: web2py deployment strategies

2017-07-20 Thread Jim S
My philosophy is to not optimize until you need to. That said, if you've got 500 tables in your app, you probably don't want to use the web2py default table instantiation on every request. Any idea what you're traffic will be like? Are you going to load balance? Our main app has over 150

[web2py] web2py deployment strategies

2017-07-20 Thread briannd81
There are several sections in the web2py documentation that showed some strategies to optimize the performance of web2py, i.e. using lazy table, memcache, etc... Should I incorporate some of these strategies on a new deployment of web2py, or should I just stick with the standard configuration

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-07-20 Thread Jim Steil
Nothing happening. Got sidetracked and haven't looked at it for a couple months. -Jim On Thu, Jul 20, 2017 at 7:12 AM, António Ramos wrote: > Hello @Jim > any news on your > > DAL and ibm_db_dbi withing an iseries? > > > regards > > 2017-04-30 15:22 GMT+01:00 'DenesL'

[web2py] Re: web2py 2.15.2 is OUT

2017-07-20 Thread Leonel Câmara
@stifan here's the fix if you want to apply it on your running code before the new version comes out https://github.com/web2py/pydal/pull/486 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: web2py 2.15.2 is OUT

2017-07-20 Thread Leonel Câmara
Stifan that error is caused because you're putting a Table in common_fields. Which I didn't expect. I'll fix it. -- 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

[web2py] Re: web2py 2.15.0b1

2017-07-20 Thread villas
Just to leave a note for anyone researching my Firebird issue... I see that Firebird has breaking backward-compatibility in web2py from change introduced here: https://github.com/web2py/pydal/pull/365 Entities are quoted by default which can cause issues. The work around is to do the

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-07-20 Thread António Ramos
Hello @Jim any news on your DAL and ibm_db_dbi withing an iseries? regards 2017-04-30 15:22 GMT+01:00 'DenesL' via web2py-users < web2py@googlegroups.com>: > Have you tried the rname parameter in the table definition?. > Denes > > On Thursday, April 27, 2017 at 8:20:40 AM UTC-4, Jim S wrote:

[web2py] Re: Python 3 brought me back.

2017-07-20 Thread Leonel Câmara
Glad to have you back! Make sure to report any issues you find as the python 3 support is very new. -- 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

[web2py] Python 3 brought me back.

2017-07-20 Thread hiro
Just wanted to say thank you to everyone involved in making web2py Python 3 compatible. Need to setup an internal application at work and having it compatible with existing codebase and environments made the decision to go with web2py easier. Have a nice summer. -- Resources: -