[web2py] restful service + auth on same application/ different controllers = gives Not authorized message

2017-11-13 Thread Leandro Sebastian Salgueiro
HI, I have two controllers on the same app: TestApp | |---default.py |---api.py api is a restful service that will call other services. For security reasons I would like that all call to these services are passed by the api restful. (it will work like a proxy in this case) I did try the follo

Re: [web2py] Re: Simple chatbot

2017-11-13 Thread Maurice Waka
in my controller: def view_searches: if db(db.post).isempty(): db.post.insert(message="Hi, it's" +' ' +auth.user.first_name+' '+ 'loging in...') form = SQLFORM(Post, formstyle='table3cols',) if form.process().accepted: pass long code... replies = db(db.answers.au

Re: [web2py] Re: Simple chatbot

2017-11-13 Thread Maurice Waka
I got the error resolved: {{=LOAD('default','view_searches.load',ajax=True)}} instead of : {{=LOAD('replies','view_searches.load',ajax=True)}} On Tue, Nov 14, 2017 at 12:06 AM, Maurice Waka wrote: > in my controller: > def view_searches: > if db(db.post).isempty(): > db.post.insert(

[web2py] How to determine the distinct values of a given grid column for the current selection

2017-11-13 Thread Vincent Borghi
Hello, I have a "normal' web2py grid with columns (including a column named "country"), thru which the users can query the db to select the lines they are interested in. Once the users have performed their selection, I need to be able to determine the distinct values of (e.g.) the "country" c

[web2py] Web2py and machine learning - scikit-learn

2017-11-13 Thread GIsaac
Hi all, I'm doing a project which will be based around web frameworks and adaptivity using machine learning, and have been looking into the possibility of using web2py. Is it possible to import/use the Scikit-learn library with web2py? Has anyone here done this? I understand that it is possib

[web2py] SQLFORM.smartgrid exportclasses

2017-11-13 Thread Peter
I need only csv export method from SQLFORM.smartgrid so I want to disable default export methods. Seems to me that SQLFORM.smartgrid(exportclasses=dict(json=False)) doesn't work in newer versions of web2py (2.14.6). My code: export_classes = dict(json=False, html=False,

[web2py] web2py 2.16.1 is OUT

2017-11-13 Thread Massimo Di Pierro
web2py 2.16.1 is OUT Lots of bugs fixes contributed by the community. Thanks Leonel, Paolo, Giovanni, and all those who contributed. the most visible changes are: - welcome now defaults to bootstrap 4 - lots of cleanup in the welcome app and new examples in default.py - simplified layout.html

[web2py] Re: web2py 2.16.1 is OUT

2017-11-13 Thread Kiran Subbaraman
Thanks for the new version. Downloaded web2py_src from web2py.com, for Windows. Extracted, and ran `python web2py.py`. In the browser see this message *"Requires web2py 2.15.5 or newer" . *Not sure what the issue is? Python 2.7.12 Windows 10 web2py Web Framework Created by Massimo Di Pierro,

[web2py] Re: web2py 2.16.1 is OUT

2017-11-13 Thread Massimo Di Pierro
I suspect you have two web2py running. Or maybe on update it did not correctly unzip. Can you try kill all and restart? On Tuesday, 14 November 2017 00:15:12 UTC-6, Kiran Subbaraman wrote: > > Thanks for the new version. > > Downloaded web2py_src from web2py.com, for Windows. Extracted, and ran

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-13 Thread Kiran Subbaraman
I don't have any other web2py instance running, or in the same path. I tried this with the web2py Windows installer (web2py_win, web2py.exe), and see the same issue. When I try to start web2py again, I see this error `ERROR:root:New installation error: unable to create welcome.w2p file`, and t

[web2py] Let's Encrypt renewals, Rocket, and nginx

2017-11-13 Thread Dave S
Today was the day for doing a manual renewal of my certificate, using certbot-auto. This did not go well for a while. First, when I tried using the nginx option, certbot expected nginx to be controlling port 443 ... but I was still running Rocket on that port. Finally, I stopped Rocket, did

Re: [web2py] Re: Simple chatbot

2017-11-13 Thread Dave S
On Monday, November 13, 2017 at 2:21:40 PM UTC-8, Maurice Waka wrote: > > I got the error resolved: > {{=LOAD('default','view_searches.load',ajax=True)}} > instead of : > {{=LOAD('replies','view_searches.load',ajax=True)}} > > Yes, in web2py it is very important to have the controller in the LOA

[web2py] Re: How to determine the distinct values of a given grid column for the current selection

2017-11-13 Thread Dave S
On Monday, November 13, 2017 at 9:57:25 PM UTC-8, Vincent Borghi wrote: > > Hello, > > I have a "normal' web2py grid with columns (including a column named > "country"), thru which the users can query the db to select the lines they > are interested in. > Can they select more than 1 line at a

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-13 Thread 黄祥
Traceback (most recent call last): File "/Users/MacBookPro/project/python/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/Users/MacBookPro/project/python/web2py/applications/test/views/default/user.html", line 129, in NameError: name 'configuration'

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-13 Thread 黄祥
forget it, just the variable name, old version use myconf, while in the recent version use configuration for appconfig best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2