[web2py] UPDATE with limit

2018-10-26 Thread Artem
Dear All , 1. How to make DAL query with update only one/first record : 'UPDATE itft SET task_status = "S", w_id="w_id" WHERE task_status = "N" LIMIT 1;' When i try something like: db(db['itft']['task_status']=="N").update(task_status = "S",w_id= "w_id", limitby=(0,1)) all rows with task_status

[web2py] Re: web2py.component , ajax call always add ".load" to the first var

2018-08-03 Thread Artem
manage to find the error : ajax("{{=URL(c='conc2', f='create_new_detail')}}" +'?t=' +t+ '_id='+c_id,[],'mbody_CRUD_Modal'); On Friday, August 3, 2018 at 6:47:23 PM UTC+8, Artem wrote: > > Hello , All! > I load component via : > > $.web2py.component("{{=URL(c='con

[web2py] web2py.component , ajax call always add ".load" to the first var

2018-08-03 Thread Artem
Hello , All! I load component via : $.web2py.component("{{=URL(c='conc2',f='c2.load')}}", 'conc_div') component have ajax calls like : ajax("{{=URL(c='conc2', f='create_new_detail?t=')}}" +t+ '_id='+c_id,[],'mbody_CRUD_Modal'); when i send t and c_id vars to function with ajax call, and

[web2py] SQLFORM keepvalues

2018-07-22 Thread Artem
Dear All ! Is anyway to keepvalues only for particular fields with SQLFORM after form accepted ? For now i'm using mysqlform.process(keepvalues=True) , and after form loaded clear all not needed fields with JS ,and as i have many forms with many fields , is real headache . -- Resources: -

[web2py] web2py + gevent

2018-07-11 Thread Artem
Dear All , Anybody using gevent with web2py ? I always getting error : >> greenlet.error: cannot switch to a different thread >>gevent.exceptions.LoopExit: This operation would block forever >> Hub: >0x119e9ba20 thread_ident=0x123145489817600>>> threadpool=> >>thread_ident=0x7b2d2000> >>

[web2py] Re: Write dynamic query in DAL without extra nested parentheses

2018-06-28 Thread Artem
Dear Antony , >From your example : query = ' OR '.join(str(db.product.id == i) for i in [list of ids]) result type(query) is a string , could you tell me how to correctly convert it to the pydal.objects.Query / Set ? I'm trying query = db(query) , and get a pydal.objects.Set , but can't use

[web2py] Re: Two database join query

2017-08-29 Thread Artem
Hi , yes i'm tried . it rise error : OperationalError: no such table: table1 On Tuesday, August 29, 2017 at 5:58:20 AM UTC+8, 黄祥 wrote: > > had you tried ? > *e.g. not tested* > rows = db(db1.table1.pid == db2.table2.pid).select() > > ref: > >

[web2py] Re: Two database join query

2017-08-28 Thread Artem
My app require two database . This why i post a question here ... On Tuesday, August 29, 2017 at 1:55:09 AM UTC+8, Alfonso Serra wrote: I guess this is the solution: https: //stackoverflow.com/questions/6824717/sqlite-how-do-you-join-tables-from-different-databases

[web2py] Two database join query

2017-08-28 Thread Artem
Hello ! Hope someone can help . Thanks in advance ! I have two database : db1 = DAL('sqlite://first.sqlite') db2 = DAL('sqlite://second.sqlite') with tables : db1.define_table('table1', Field('id',requires=IS_NOT_EMPTY()), Field('pid',type='integer'), Field('title',type='string'), ) and

[web2py] Communication error

2017-08-15 Thread Artem
Hi! Sos! Communication error occurred permanently . Admin interface running very slow . ../admin/errors and app/errors are empty . How to define/fix the issue ? 2.15.3-stable+timestamp.2017.08.07.12.51.45 (Running on Rocket 1.2.6, Python 2.7.3) -- Resources: - http://web2py.com -