Re: [web2py] Re: web3py again....

2019-04-02 Thread Kevin Keller
I agree. In fact, the whole client side today should be Javascript and just communicate via REST+JWT (even though in the enerprise space you will also need OAUTH2). The models need to be exposed via REST easiliy and it should be easy to add auth to routes with JWT. Also the REST endpoints once d

Re: [web2py] Re: web3py again....

2019-04-02 Thread Kevin Keller
https://editor.swagger.io/?_ga=2.227432986.689200959.1554189909-55439989.1547630410 Swagger JSON editor + https://swagger.io/specification/. So one Swagger Json file can contain the description of all the endpoints. On Tue, Apr 2, 2019 at 9:19 AM Kevin Keller wrote: > I agree. > > In fact, the

[web2py] Re: How can I convert a SUM from a SQLite SELECT statement to web2py's DAL?

2019-04-02 Thread João Matos
I had already read it. Unfortunately it didn't help. terça-feira, 2 de Abril de 2019 às 00:23:14 UTC+1, Scott Hunter escreveu: > > This part of the web2py book might help: > http://www.web2py.com/book/default/chapter/06#sum-avg-min-max-and-len > > On Monday, April 1, 2019 at 6:41:51 PM UTC-4, Jo

Re: [web2py] Re: web3py again....

2019-04-02 Thread Kevin Keller
Here is a project that generates swagger(openapi) documentation for flask+sqlalchemy. https://github.com/thomaxxl/safrs I was already wondering about changing bottle with flask, but I dont know if that is heresy now :). On Tue, Apr 2, 2019 at 9:31 AM Kevin Keller wrote: > > https://editor.swagg

[web2py] Newst Trunk Edition (4th April 2019) rocket wont start

2019-04-02 Thread Kevin Keller
Centos7 Python 3.7.1 git cloning this repo just now, generating ssl certs and then starting up like this: python3.7 web2py.py -k myapp.key -c myapp.crt -i 0.0.0.0 -p 8000 trhows this after punching id admin pass: Exception in thread Thread-2: Traceback (most recent call last): File "/usr/

[web2py] pbkdf2_hmac error on PythonAnywhere

2019-04-02 Thread Philip Kilner
Hi, I've just upgraded web2py to 2.18.4 and auth is throwing: - 'module' object has no attribute 'pbkdf2_hmac' ...which I understand is because PythonAnywhere are using Python 2.7.6, but "pbkdf2_hmac" was introduced in 2.7.8. Is this a known issue? I'm not expecting to be able to ask Pyt

[web2py] Re: Newst Trunk Edition (4th April 2019) rocket wont start

2019-04-02 Thread Kevin Keller
Works fine on windows10, python 3.7.1 without ssl and firing it up locally.. On Tuesday, 2 April 2019 10:27:46 UTC+2, Kevin Keller wrote: > > Centos7 > Python 3.7.1 > > git cloning this repo just now, generating ssl certs and then starting up > > like this: > python3.7 web2py.py -k myapp.key -

[web2py] Re: Newst Trunk Edition (4th April 2019) rocket wont start

2019-04-02 Thread Kevin Keller
Reverting to the version from the zip file on home page ("For Users") works.. On Tuesday, 2 April 2019 10:32:16 UTC+2, Kevin Keller wrote: > > Works fine on windows10, python 3.7.1 without ssl and firing it up > locally.. > > On Tuesday, 2 April 2019 10:27:46 UTC+2, Kevin Keller wrote: >> >> C

[web2py] Re: Newst Trunk Edition (4th April 2019) rocket wont start

2019-04-02 Thread Kevin Keller
On no.. it doesnt... On Tuesday, 2 April 2019 10:42:52 UTC+2, Kevin Keller wrote: > > Reverting to the version from the zip file on home page ("For Users") > works.. > > On Tuesday, 2 April 2019 10:32:16 UTC+2, Kevin Keller wrote: >> >> Works fine on windows10, python 3.7.1 without ssl and firi

[web2py] Re: Newst Trunk Edition (4th April 2019) rocket wont start

2019-04-02 Thread Kevin Keller
Same on a totally different fresh ubuntu server with python 3.6.. with version from github.. On Tuesday, 2 April 2019 10:44:24 UTC+2, Kevin Keller wrote: > > On no.. it doesnt... > > On Tuesday, 2 April 2019 10:42:52 UTC+2, Kevin Keller wrote: >> >> Reverting to the version from the zip file on

[web2py] Re: Is it possible to show the results from a SELECT (made with SQLite using db.executesql) in a grid?

2019-04-02 Thread João Matos
That worked. Thanks. terça-feira, 2 de Abril de 2019 às 06:43:41 UTC+1, Val K escreveu: > > Create view in sqlite "CREATE VIEW your_tbl_name AS SELECT ..." using > executesql and define corresponding web2py table with migrate=False, > fake_migrate=True -- Resources: - http://web2py.com - http

[web2py] Re: How can I convert a SUM from a SQLite SELECT statement to web2py's DAL?

2019-04-02 Thread Dave S
On Tuesday, April 2, 2019 at 12:45:04 AM UTC-7, João Matos wrote: > > I had already read it. Unfortunately it didn't help. > > Can you show what you tried with .sum() ? Did you get errors, or did you get a result that was unexpected? What was the expected result? /dps > terça-feira, 2 de A

[web2py] Return random row on left join in one to many

2019-04-02 Thread David Orme
Hi, I have two tables: `tx` contains a set of named objects and then `tx_vals` contain 0 to many possible values for those objects. I want to obtain a table that contains all named objects in `tx` and one random value from `tx_vals`. I think that has to be a left join to get the null values wh

Re: [web2py] Re: Newst Trunk Edition (4th April 2019) rocket wont start

2019-04-02 Thread Kevin Keller
Overcame the issue for now using apache and mod_wsgi with self-signed cert.. But something is definietly wrong with the rocket server at the moment.. On Tue, Apr 2, 2019 at 10:50 AM Kevin Keller wrote: > Same on a totally different fresh ubuntu server with python 3.6.. with > version from githu

[web2py] Re: web3py again....

2019-04-02 Thread 黄祥
yes, you are right, my bad, like the idea of jekpack (combine server side (jekyll ruby) with client side (webpack js), perhaps can learn from it and adapt it to web3py. ref: https://github.com/yfxie/jekpack ever thought of graphql as an option to REST? best regards, stifan -- Resources: - http

Re: [web2py] pbkdf2_hmac error on PythonAnywhere

2019-04-02 Thread Nico Zanferrari
Hi, I've also upgraded on PythonAnywhere from the web2py admin interface to 2.18.4, but without any problems. Does the error happen also with the standard welcome app? Nico Il giorno mar 2 apr 2019 alle ore 10:30 Philip Kilner ha scritto: > Hi, > > I've just upgraded web2py to 2.18.4 and auth

[web2py] Compressed bootstrap.min.css

2019-04-02 Thread Константин Комков
Why web2py compressed bootstrap.min.css in old project and don't do that in new project. Web2py version is 2.18.4 -- 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 Issu

[web2py] Re: Redis and Python3?

2019-04-02 Thread Jim S
Massimo - I've updated my change per your suggestion. Also, I've made a pull request to get these changes merged. This is my first time contributing (to any open source project) so please let me know if I messed something up. -Jim On Tuesday, April 2, 2019 at 1:31:10 AM UTC-5, Massimo Di Pie

Re: [web2py] pbkdf2_hmac error on PythonAnywhere

2019-04-02 Thread Philip Kilner
Since I asked the question, the ever-helpful Giles has popped up in the forum at PythonAnywhere, and he tells me that they work off images, and that mine was an old one - he's organising an update to the latest version, which takes Python to 2.7.12, I suspect that if you are able to check your

[web2py] Re: Is it possible to show the results from a SELECT (made with SQLite using db.executesql) in a grid?

2019-04-02 Thread Anthony
Note, you do not need to set fake_migrate, as long as migrate=False (the DAL will simply ignore migrations for that table). On Tuesday, April 2, 2019 at 1:43:41 AM UTC-4, Val K wrote: > > Create view in sqlite "CREATE VIEW your_tbl_name AS SELECT ..." using > executesql and define corresponding

[web2py] Re: Compressed bootstrap.min.css

2019-04-02 Thread Константин Комков
-- 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 are subscribed to the Google Groups "web2py-users" group. To unsubsc

[web2py] Re: web3py again....

2019-04-02 Thread Carlos Costa
Will it have default url routes? beyond that, my thought about ui widgets: I think it would be nice: 1 - to have an easy integration via a model rest api 2- be agnostice to client side frameworks 3 - come with a default client side framework (preferably vue) 4 - have a ui lib by default 5 - have

[web2py] Re: Is it possible to show the results from a SELECT (made with SQLite using db.executesql) in a grid?

2019-04-02 Thread João Matos
Thanks for the tip Anthony. Is the purpose of the fake_migrate parameter only for the scenarios in the manual or are there any other uses for it? terça-feira, 2 de Abril de 2019 às 16:52:45 UTC+1, Anthony escreveu: > > Note, you do not need to set fake_migrate, as long as migrate=False (the > D

Re: [web2py] Re: web3py again....

2019-04-02 Thread John Underhill
I think all this bears some brainstorming in light of what’s going on with Webassembly. I’m not saying Javascript for building web UIs isn’t the future, but... Ok, quick show of hands: How many people absolutely adore Javascript? Oh wait, it doesn’t matter, because we have no choice. Or do we

[web2py] Re: How can I convert a SUM from a SQLite SELECT statement to web2py's DAL?

2019-04-02 Thread João Matos
The output from the SQLite statement is this idusernamecanceled_oncanceled_byoperadorverificador supervisor 4leitor 0 0 0 3operador 1 0 0 2supervi

[web2py] How can I block logins from users with is_active == False?

2019-04-02 Thread João Matos
Hello, How can I block logins from users with is_active == False? Thanks, JM -- 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

[web2py] Re: How can I block logins from users with is_active == False?

2019-04-02 Thread João Matos
Found a solution def check_if_user_is_active(form): """Check if user is active.""" if not db.auth_user(username=form.vars.username).is_active: session.flash = T('That username is not active.') redirect(URL('user', 'login')) auth.settings.login_onvalidation.append(check_if