[web2py] Re: Code change in oracle.py to allow joins in pagination.

2016-10-27 Thread 'tomt' via web2py-users
I downloaded the latest release, 2.14.6, and downloaded my patch file from this post and applied it against oracle.py: cd gluon/packages/dal/pydal/adapters patch < oracle.patch It created the oracle.py I expected and it runs correctly. Are you referring to a different version of web2py? - Tom

[web2py] pack web2py app function in controller

2016-10-27 Thread 黄祥
learn from admin app i want to create a function in controller to pack web2py app, it downloaded *.w2p but the models, controllers and views is empty (no files in there) e.g. controllers/default.py import StringIO stream = StringIO.StringIO() from gluon.admin import * def safe_open(a, b): if

[web2py] problem with sqleditable

2016-10-27 Thread Vic Ding
Dear all, I am using SQLEDITABLE to manage a record set. However, only the visible ones are being edited/inserted. The not visible ones, including auth info are not recorded. For example, I set > db.purchase_order_product.currency.default =1 > >

[web2py] Re: question about scheduler

2016-10-27 Thread 黄祥
thanks all 1. got it 2. already tested it, the problem is, if put all tasks in 1 controller, when 1 task is failed, then run queue task, another task that have status is queued will get doubled. 3. going to wait for the cronlike feature in stable version *another question:* 4. is it best

[web2py] Re: DEADLOCKs between two or more scheduler worker

2016-10-27 Thread Niphlod
the only thing you can do is either beefing up the database instance (less deadlocks because of faster execution of queries) or lower the db pressure (lower number of workers, higher heartbeat). -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: tasks hierarchy

2016-10-27 Thread Niphlod
hum...how can cat3 be queued if cat3 depends on cat2 being executed ? Or what you wanted to know is how to give a higher priority to cat1 tasks instead of cat2 tasks (i.e. they are not related, it's just that you prefer cat2 remaining in the queue a bit longer if there are cat1 tasks)? In that

[web2py] Re: tasks hierarchy

2016-10-27 Thread Niphlod
BTW: "error coordinating ticker" happening seldomly is not a big issue: for that round no workers were eligible to be tickers (i.e. dispatchers) but the next round will elect one. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: question about scheduler

2016-10-27 Thread Niphlod
1. they get deleted because in the test app the controller showing all the details just grabs every record in all tables. You don't need (nor want) to clear everything every time you queue something...else it won't be a queue :P 2. the deal is should the first task run alongside the second or

[web2py] Re: Custom formstyle for auth

2016-10-27 Thread Niphlod
you can code your own formstyle and pass it to formstyle (or set the global response.formstyle). On top of accepting what's included in web2py as a string, it accepts a callable for "bring your own". On Tuesday, October 25, 2016 at 4:52:12 PM UTC+2, Marko Seppälä wrote: > > Hi, > > I'm trying

[web2py] Re: CouchDB support

2016-10-27 Thread Niphlod
couchdb support is experimental. to "enable" it, you must use the source version and install the 'couchdb' module using pip to make it available to web2py. On Tuesday, October 25, 2016 at 7:06:09 AM UTC+2, Robert F wrote: > > Still on the learning curve regarding Web2py but would like to know

Re: [web2py] Setting up nginx to enable CORS for a specific function?

2016-10-27 Thread Spokes
For reasons that are not entirely clear to me yet, request.vars suddenly started showing the expected content... Thanks, I'll read up on the Restful and json services portions of the book. On Thursday, October 27, 2016 at 1:43:41 PM UTC-4, mcm wrote: > > You did not POST any multipart/mime or

Re: [web2py] Setting up nginx to enable CORS for a specific function?

2016-10-27 Thread Michele Comitini
You did not POST any multipart/mime or form encoded var so no request.vars. you should probably read the request.body content for JSON. try to look into restful services or json services (see the book) to have that done automagically... 2016-10-27 17:17 GMT+02:00 Spokes

[web2py] Re: Select query returns value with type

2016-10-27 Thread Anthony
On Thursday, October 27, 2016 at 12:12:15 PM UTC-4, xgp.lat...@gmail.com wrote: > > Anthony, > > From i what i read from you, DAL returns int with type long int > attached.Ex:9632L. > > If i want a string then i must str( row ). > > How do i get the int without type description, Ex: > [2015L,

[web2py] Re: Select query returns value with type

2016-10-27 Thread xgp . latino
Anthony, >From i what i read from you, DAL returns int with type long int attached.Ex:9632L. If i want a string then i must str( row ). How do i get the int without type description, Ex: [2015L, 6249L, 2016L, 9632L], [2015, 6249, 2016, 9632] Do you get me? Regards, El jueves, 27 de

[web2py] Re: Select query returns value with type

2016-10-27 Thread Anthony
On Thursday, October 27, 2016 at 10:28:20 AM UTC-4, xgp.lat...@gmail.com wrote: > > Anthony, > > Thanks for your reply. > What happens if i need the int not the str? Do i parse it twice? > You should be able to use the long integers as any other integers. Are you having a problem? Can you show

Re: [web2py] Setting up nginx to enable CORS for a specific function?

2016-10-27 Thread Spokes
Thanks, Michele; that worked like a charm! The only issue is that request.vars is empty - any idea as to what could be causing that? On Wednesday, October 26, 2016 at 4:01:06 PM UTC-4, mcm wrote: > > You can do that easily in web2py... > > Below is a sample of a decorator that allows any

[web2py] Re: DEADLOCKs between two or more scheduler worker

2016-10-27 Thread Pierre
I have got deadlocks too but postgresql knows how to resolve this so i don't need worry about it. take a look here: https://www.postgresql.org/docs/9.1/static/explicit-locking.html /*---excerpt--*/

[web2py] Re: Select query returns value with type

2016-10-27 Thread xgp . latino
Anthony, Thanks for your reply. What happens if i need the int not the str? Do i parse it twice? Regards, El jueves, 27 de octubre de 2016, 0:34:41 (UTC-5), Anthony escribió: > > The DAL parses all integer values into Python *long* integers >

[web2py] good solution for indexing script which should run always

2016-10-27 Thread Mirek Zvolský
I need run a script which for marked records in one table creates "indexing" or "helpers" records in another table. This script should: - switch this activity and sleep(10) /should sleep after it will not find any marked record/ - run always - run in 1 instance only /to avoid indexing of same

[web2py] DEADLOCKs between two or more scheduler worker

2016-10-27 Thread Erwn Ltmann
Hi, I have a deadlock after a while of running more than one worker, e.g. output for both appearences: 10:29:07,903 [31505] Scheduler - ERROR - Error cleaning up > 10:29:07,904 [31505] Scheduler - ERROR - (1213, u'Deadlock found when > trying to get lock; try restarting transaction') >