[web2py] Re: json-rpc

2018-04-24 Thread 黄祥
*json rpc (1.1 and 2) * *for curl should be* curl -X POST -d '{"method": "add", "params": [42, 23], "id": 1}' -i http://127.0.0.1:8000/test/default/call/jsonrpc curl -X POST -d '{"method": "add", "params": {"a": 42, "b": 23}, "id": 1}' -i http://127.0.0.1:8000/test/default/call/jsonrpc curl -X

[web2py] Re: change the record of a table

2018-04-24 Thread Vash
On Tuesday, April 24, 2018 at 11:46:07 AM UTC-7, Anthony wrote: > > On Tuesday, April 24, 2018 at 2:37:37 PM UTC-4, Vash wrote: >> >> say I have a table >> db.define_table('mytable', >>Field('is_public', 'boolean', default=False), >> ) >> I want to toggle this to

[web2py] Validate a GET request using SQLFORM.factory and request vars

2018-04-24 Thread Alfonso Serra
Hi everybody. Im trying to validate a simple GET request using SQLFORM.factory. but cant get it to pass. I would like just to validate those variables but i dont know what im missing. On the docs theres not much info about forms and the get method but form.accepts(request.vars, ...). The url

Re: [web2py] Re: web2py 2.16.1 and login menu on mobile systems NOT WORKING

2018-04-24 Thread Massimo Di Pierro
thanks Anthony. I keep saying "trunk" and should switch to a more appropriate terminology. :-) On Monday, 23 April 2018 09:19:48 UTC-5, Anthony wrote: > > On Monday, April 23, 2018 at 7:35:35 AM UTC-4, Andrea Fae' wrote: >> >> I'm sorry. What is "in trunk"? >> > > That just refers to the master

Re: [web2py] web2py 2.16.1 and login menu on mobile systems NOT WORKING

2018-04-24 Thread Massimo Di Pierro
please I could use some help with this. On Sunday, 22 April 2018 19:16:15 UTC-5, Carlos Cesar Caballero wrote: > > Yes, I usually use a newer bootstrap version, and make some fixes in the > layout bar. > > Testing the trunk I can see that is fixed, but there are some responsive > issues. Is

Re: [web2py] please help us test trunk web2py

2018-04-24 Thread Massimo Di Pierro
please do even be aware that in trunk bs4 we no longer use the auth.navbar() I think the code is more transparent to new users without it. We may deprecate it. On Sunday, 22 April 2018 19:05:31 UTC-5, Carlos Cesar Caballero wrote: > > Hi, I was testing and there are some issues with the DAL

[web2py] Re: 'Column table.id not found (SQLTABLE)'

2018-04-24 Thread Massimo Di Pierro
strange the local pydal should take precendence over the pip installed one. did you change the order package import somehow? On Friday, 20 April 2018 20:05:28 UTC-5, Brian M wrote: > > Thank you for mentioning this - just wasted an hour plus trying to figure > out why my code had stopped

[web2py] Re: problem export virtual field to CSV using grid

2018-04-24 Thread Massimo Di Pierro
Please open a ticket with a suggestion for improvement On Sunday, 8 April 2018 08:58:04 UTC-5, Vic Ding wrote: > > Hi all, > I am having issue exporting virtual fields to CSV using grid. It displays > fine though. > > I defined field in this way > > Field.Virtual('cost_value', lambda row:

[web2py] Re: Dynamic url routing

2018-04-24 Thread Massimo Di Pierro
no On Wednesday, 18 April 2018 13:13:24 UTC-5, kamala kotha wrote: > > routes_in = ( >('/(?P[\w]+)(?P.*)', > '/myapp\g?client=\g'), > ) > > user will have to see the same url they had entered. > so how should i have the routes_out so that outgoing url is same as >

[web2py] Re: MySql deprecation of NO_AUTO_CREATE_USER

2018-04-24 Thread Massimo Di Pierro
I believe this is fixed in the most recent DAL On Sunday, 15 April 2018 23:18:04 UTC-5, Joe Barnhart wrote: > > Anybody else seeing this? > > .../gluon/contrib/pymysql/cursors.py:166: Warning: (3090, u"Changing sql > mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future >

[web2py] Re: Request with login privileges hangs for a specific user account, how to debug it?

2018-04-24 Thread Lisandro
Hi Massimo, thank you for your time. I had marked this thread as "no action needed" because I found the cause of the issue. First I thought it was a different problem, so I opened a new thread in this forum: https://groups.google.com/forum/#!topic/web2py/E9jrmf5E-B4 The title of that thread is

[web2py] Re: Strange behaviour between two grids and different Bootstrap versions

2018-04-24 Thread Massimo Di Pierro
Can you post a minimalist app to reproduce? On Wednesday, 11 April 2018 15:39:56 UTC-5, greenpoise wrote: > > So, I have this two applications with different bootstrap versions. One is > older version with Bootstrap 3 and the grid works perfectly. I am able to > view and edit the item and it

[web2py] Re: Caching DAL Selects - only cache.ram works?

2018-04-24 Thread Massimo Di Pierro
please post a minimal model to reproduce the problem. On Tuesday, 3 April 2018 17:15:25 UTC-5, Brian M wrote: > > Further investigation shows that cache.redis plays nicely with pyodbc *as > long as you have all uniquely named fields in your select*. The selects > that I was working with

[web2py] Re: Scheduler workers crash on usage of urllib

2018-04-24 Thread Massimo Di Pierro
yes. asap. On Friday, 6 April 2018 17:02:32 UTC-5, Antonio Salazar wrote: > > Shouldn't this warrant a new release? The last stable release is 2.16.1 > and the fix is missing there. > > On Saturday, December 16, 2017 at 3:47:06 PM UTC-6, Massimo Di Pierro > wrote: >> >> fixed on gitghub. thanks

[web2py] Re: Request with login privileges hangs for a specific user account, how to debug it?

2018-04-24 Thread Massimo Di Pierro
That query itself cannot case hanging but maybe when that query is executed the database is busy with some other background task? Try setting migrations to false. may be you are doing more database IO than you should On Friday, 6 April 2018 09:41:09 UTC-5, Lisandro wrote: > > Hi Anthony, again,

[web2py] Re: Updated Version of web2py and sending emails stopped working

2018-04-24 Thread Massimo Di Pierro
Notice that web2py in trunk supports sending emails from AWS+SNS just do mail.settings.server='aws' the sender email must be authorized in the SNS config On Wednesday, 4 April 2018 20:17:20 UTC-5, Dave S wrote: > > > > On Wednesday, April 4, 2018 at 6:13:06 PM UTC-7, Dave S wrote: >> >> >> >>

[web2py] Re: FYI: A tutorial on how to customize export in SQLFORM.grid

2018-04-24 Thread Massimo Di Pierro
fee free to create a better mechanism for that. We should really re-factor forms and grid On Wednesday, 4 April 2018 03:46:46 UTC-5, Dave S wrote: > > > > On Tuesday, April 3, 2018 at 7:49:43 AM UTC-7, Alex Beskopilny wrote: >> >> Hi! >> exporter example >> >> 0 pip install xlwt >> 1 at end of

Re: [web2py] How do I upload the .w2py file?

2018-04-24 Thread Massimo Di Pierro
I confirm. I use that all the time (but there is no dash) tar zxvf web2py_app.w2p On Tuesday, 3 April 2018 23:33:12 UTC-5, 黄祥 wrote: > > like marco said, it's just tar.gz file, think you can extract it in > web2py/applications folder with the command (not tested) > tar -xzvf web2py_file.w2p >

[web2py] Re: HOW CAN I PRINT THIS

2018-04-24 Thread Dave S
On Tuesday, April 24, 2018 at 1:30:42 PM UTC-7, Ayron Rangel wrote: > > Like this: > > {{for row in results:}} > > {{=row.id}} > {{=row.product}} > > > appears erros > > > For us to comment intelligently about the errors, you have to provide the error details. Is there a ticket

[web2py] Re: Docker Image for CentOS and Alpine

2018-04-24 Thread David Sperling
We are looking for a way to bypass the admin application security checks when running in a container. Any suggestions? The issue and detailed questions are here: https://github.com/web2py/web2py/issues/1913 On Friday, April 20, 2018 at 11:32:45 AM UTC-7, David Sperling wrote: > > We have been

[web2py] Re: HOW CAN I PRINT THIS

2018-04-24 Thread Ayron Rangel
Like this: {{for row in results:}} {{=row.id}} {{=row.product}} appears erros Em terça-feira, 24 de abril de 2018 16:59:11 UTC-3, Dave S escreveu: > > > > On Tuesday, April 24, 2018 at 6:49:57 AM UTC-7, Ayron Rangel wrote: >> >> Guys, >> >> How can i print this in HTML (CUSTOM) DAL :

[web2py] Re: Insert not inserting data

2018-04-24 Thread Kenneth
The function that contains this does a lot of things, but nothing else regarding this table. And no values are not hard coded, just trying to find out the problem so I made it as simple as possible. If I look at the table in MySQL prompt is see that highest record ID is lets say 24030, I run

[web2py] Re: HOW CAN I PRINT THIS

2018-04-24 Thread Dave S
On Tuesday, April 24, 2018 at 6:49:57 AM UTC-7, Ayron Rangel wrote: > > Guys, > > How can i print this in HTML (CUSTOM) DAL : > def stock (): >sum = db.input_inventory.input_price.sum() >count = db.input_inventory.product.count() >results =

[web2py] Re: change the record of a table

2018-04-24 Thread Anthony
On Tuesday, April 24, 2018 at 2:37:37 PM UTC-4, Vash wrote: > > say I have a table > db.define_table('mytable', >Field('is_public', 'boolean', default=False), > ) > I want to toggle this to true if user clicked on the icon > if request.args(0) is not None: > q =

[web2py] change the record of a table

2018-04-24 Thread Vash
say I have a table db.define_table('mytable', Field('is_public', 'boolean', default=False), ) I want to toggle this to true if user clicked on the icon if request.args(0) is not None: q = ((db.checklists.user_email == auth.user.email) & (db.checklists.id ==

[web2py] Re: how to use tornado with ssl?

2018-04-24 Thread António Ramos
typo python gluon/contrib/websocket_messaging.py -k mykey -p 1 -s keyfile.pem *-c cert.pem* 2018-04-24 16:39 GMT+01:00 António Ramos : > how do i generate the 2 pem files below? > > python gluon/contrib/websocket_messaging.py -k mykey -p 1 -s > keyfile.pem > >

[web2py] how to use tornado with ssl?

2018-04-24 Thread António Ramos
how do i generate the 2 pem files below? python gluon/contrib/websocket_messaging.py -k mykey -p 1 -s keyfile.pem regards? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: web2py 2.16.1 is OUT

2018-04-24 Thread Richard Vézina
Here : https://github.com/web2py/web2py/issues/1911 On Tue, Apr 24, 2018 at 11:20 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Also, to my understanding it only log an error, it no big deal, as long as > the welcome app package is there... What we could do it to log an error > when

Re: [web2py] Re: web2py 2.16.1 is OUT

2018-04-24 Thread Richard Vézina
Also, to my understanding it only log an error, it no big deal, as long as the welcome app package is there... What we could do it to log an error when there is actually no welcome app pacakge as it break web2py functionality other then that as long as the welcome package is there the only issue

Re: [web2py] Re: web2py 2.16.1 is OUT

2018-04-24 Thread Richard Vézina
Yes but even then, in the end you don't want to create a new welcome package if it not a new install as it gonna slow things down... So it will end slow down thing and always create an new welcome package, no?? I would leave it like that and add a NEWINSTALL empty file in the repository... We

[web2py] Re: create users manually

2018-04-24 Thread Anthony
You can use the auth.register_bare() method to loop through a set of user records, register each, and then send an email with the temporary password. I think you can also leave out the password altogether, in which case, users will have to go through the password reset process to create a

[web2py] HOW CAN I PRINT THIS

2018-04-24 Thread Ayron Rangel
Guys, How can i print this in HTML (CUSTOM) DAL : def stock (): sum = db.input_inventory.input_price.sum() count = db.input_inventory.product.count() results = db(db.input_inventory).select(db.input_inventory.product, count, sum, groupby = db.product) return locals() HMTL: {{row in

Re: [web2py] Re: web2py 2.16.1 is OUT

2018-04-24 Thread Carlos Cesar Caballero Díaz
I think we should check if the file exists before try to delete it. or move the unlik() function to a new "try-except" block, something like: if welcome.w2p is correctly created:     try:     os.unlink('NEWINSTALL')     except FileNotFoundError:     nothing to do     except:   

[web2py] Re: json-rpc

2018-04-24 Thread 黄祥
trying to learn rpc *controllers/default.py* from gluon.tools import Service service = Service() def call(): return service() @service.xmlrpc @service.jsonrpc @service.jsonrpc2 def add(a, b): return a + b *using curl* curl -X GET -d '{"jsonrpc":"2.0","method":"add","params":["1","2"] }'