[web2py] Re: web3py again....

2019-03-28 Thread Massimo Di Pierro
People asked about the Goal. My goal is: - preserve as much as possible of web2py syntax that we love - much faster - simpler code base (so far less than 300 lines of code in a single file) - move more logic to apps and js libs - web2py's goal was to make it simple to build complex web apps. web3p

[web2py] Re: web3py again....

2019-03-28 Thread Massimo Di Pierro
My thought exactly. On Thursday, 28 March 2019 18:46:47 UTC-7, Joe Barnhart wrote: > > I agree that back porting web2py code should be straightforward (after > all, it's not rocket science :-D). But maybe we should revisit those > modules and pare them down to minimalist proportions. I really

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

2019-03-28 Thread Kevin Keller
I like the general direction of it. Auth and sqlform backported would of course be great. With bottle in the middle we can tap into the bottle community extensions but also gain extra flexibility.. Combined with web2py sqlform and Auth etc could be a real winner On Fri, 29 Mar 2019, 02:46 Joe Ba

[web2py] Re: web3py again....

2019-03-28 Thread Joe Barnhart
I agree that back porting web2py code should be straightforward (after all, it's not rocket science :-D). But maybe we should revisit those modules and pare them down to minimalist proportions. I really need Auth, complete with user roles and groups, but there's probably a better way to minim

[web2py] Re: Not my type

2019-03-28 Thread Joe Barnhart
Hi Al -- First off, welcome to the web2py group. Next, it's not clear from your message just what the question is. If you can elaborate on (a) what you did, (b) what you expected, and (c) what you got, I'm sure someone here can help Warm regards, Joe B. On Thursday, March 28, 2019 at 2:10:

Re: [web2py] web3py again....

2019-03-28 Thread 黄祥
interested in github readme : - it is not as good as web2py yet, but it is 10-20x faster perhaps could you share which benchmark method or tools to get this conclusion (compare with similar web2py todo apps) ? best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] web3py again....

2019-03-28 Thread junderhill
For authentication, Okta, Azure AD B2C, etc. are options that offload a lot of trouble, but I like having a fully-functional Auth built-in and we do use it in some projects. It needs full OIDC support. YMMV. We build scalable back ends with Web2py using Postgres and Nginx. John On Thursday,

[web2py] Re: Using the results of a variable returned by one function in another function

2019-03-28 Thread mostwanted
I put up this line rslts=db((db.business.place==results.id) & (db.business.services==request. vars.services_id)).select() The good thing is i am not getting any errors anymore but now the page is displaying nothing at all! I am not getting any results in my view *CONTROLLER* def Results():

[web2py] Re: Using the results of a variable returned by one function in another function

2019-03-28 Thread mostwanted
I put up this line rslts=db((db.business.place==results.id) & (db.business.services==request. vars.services_id)).select() The good thing is i am not getting any errors anymore but now the page is displaying nothing at all! I am not getting any results in my view *CONTROLLER* def Results():

[web2py] Grid sorting questions (referenced fields and case sensitive)

2019-03-28 Thread João Matos
Hello, I have these 2 tables opt and opt_cat, where opt depends on opt_cat for the category name and other settings. db.define_table('opt', Field('name', 'string', label=T('Name'), length=NAME_LEN, notnull=True, required=True, unique=True),

Re: [web2py] web3py again....

2019-03-28 Thread Marcelo Huerta
El jueves, 28 de marzo de 2019, 6:57:08 (UTC-3), José L. escribió: > > >- sqlform and grid are one of the key points for web2py. It's one of >the main reasons to use it instead of other frameworks as development is >really quick. However I think nowadays a backport from web2py is not

[web2py] Re: Is there a way to differentiate between a form refresh (F5) and a submit that calls back the form?

2019-03-28 Thread João Matos
Had to revert this elif request.post_vars.modified_on != str(form.record.modified_on): session.flash = T('Record was changed while you were editing. ' 'This is the updated record.') redirect(URL(args=request.args, vars=request.get_vars, user_signature= True)) to t

[web2py] Grid sorting bug when default orderby column type is date

2019-03-28 Thread João Matos
Hello, I have this action @auth.requires(auth.has_membership(CHECKER_ROLE) or auth.has_membership( SUPERVISOR_ROLE)) def list_tags_to_issue(): """List tags to issue. :return: Dict with grid. """ query = ((db.wo.is_active == True) & (db.wo.tags_issued == False)

[web2py] Re: session.connect()

2019-03-28 Thread 'Annet' via web2py-users
Hi Anthony, Thanks for your reply. I added response.cookies['session_id_cms']['domain'] = '.yourdomain.com ' to a model file in the cms app. And in the init app I have session.conne

[web2py] Re: web3py again....

2019-03-28 Thread 黄祥
great, tested it *environment* $ uname Darwin $ python -V Python 3.7.2 *steps* git clone https://github.com/web2py/web3py cd web3py pip install -r requirements.txt python web3py.py applications/ open http://localhost:8000/todo/index *result in browser* can add (save) and delete data in browser

[web2py] Re: Is there a way to differentiate between a form refresh (F5) and a submit that calls back the form?

2019-03-28 Thread João Matos
Made the changes you suggested. Thanks Anthony. This is an example of my new onvalidation, just in case you have other tips :) def on_validation(form: SQLFORM) -> None: """Used in the edit form, including when creating and deleting. :param form: Form. """ # Fix for SQLite instea

[web2py] Re: Is there a way to differentiate between a form refresh (F5) and a submit that calls back the form?

2019-03-28 Thread Anthony
> > which I changed now to this > > elif request.post_vars.modified_on != str(db.client(request.vars.id). > modified_on): > session.flash = T('Record was changed while you were editing. ' >'This is the updated record.') > redirect(URL(args=request.args, vars=req

[web2py] Re: Strange error on grid edit

2019-03-28 Thread João Matos
I was able to "solve" it with a kludge. I changed this _href=URL('get_approval', args=[row.opt.id], user_signature=True), to this _href=URL('get_approval', args=[str(row).split("'id': ")[1].split(',')[0]], user_signature=True), and now everything works. But I still don't understand why the st

[web2py] Strange error on grid edit

2019-03-28 Thread João Matos
Hello, I have this grid # Hidden fields in grid and edit/view form. db.opt.canceled_on.readable = False db.opt.canceled_by.readable = False db.opt.cancel_approved_by.readable = False query = ((db.opt.is_active == True) & (db.opt.opt_cat_id == db. opt_cat.i

[web2py] Re: Using the results of a variable returned by one function in another function

2019-03-28 Thread Leonel Câmara
Just send the services id in the URL either as an arg or a var and then do something like this: rslts=db((db.business.place==results.id) & (db.business.services==request.vars.services_id)).select() Notice that I also removed a query you had in the select call, which was wrong. -- Resources:

[web2py] Re: Is there a way to differentiate between a form refresh (F5) and a submit that calls back the form?

2019-03-28 Thread João Matos
Thanks for the tip. I was using this (it's included in the above code) elif request.post_vars.modified_on != str(db.client(request.vars.id). modified_on): form.errors.code = T('Record was changed while you were editing. ' 'Press F5 to refresh and press Rese

[web2py] Re: Compartilhar aplicações feita em Web2py em Rede Local.

2019-03-28 Thread Leonel Câmara
Hey Alessandro, this is an international group so please use English instead of Portuguese. Basically you just need to be sure your computer has a static local network ip which you can probably configure in your wireless router if he's the one running DHCP. Then run web2py on that ip instead of

[web2py] Re: web3py again....

2019-03-28 Thread Leonel Câmara
I haven't tried it, but looking at the code... Can you explain a little bit more what you're trying to achieve here? This seems like it's bottle with pydal and yatl. Why not just use bottle then? It will force me to learn bottle anyway. -- Resources: - http://web2py.com - http://web2py.com

Re: [web2py] web3py again....

2019-03-28 Thread José Luis Redrejo
Just tested, some considerations: 1. Tested with Python 3.6, followig strictly the provided instructions, several things don't work: a) static folder is not working properly. I get a 404 error for all the requests 127.0.0.1 - - [28/Mar/2019 10:45:10] "GET /todo/index HTTP/1.1" 200 828 127.0.0.1 -

[web2py] web3py again....

2019-03-28 Thread Massimo Di Pierro
I know this comes up once in a while but ... https://github.com/web2py/web3py what do you think? It is very preliminary but I will have an admin soon. Backporting SQLFORM, grid and Auth, should not be that complicated, although I think we can do better. Massimo -- Resources: - http://we

[web2py] Not my type

2019-03-28 Thread Al Hart
Hi folks, if you'll pardon the corny title, I am brand new to web2py (so excited to discover it) and I'm just working may way through the book. In Chapter two, the section on types, I tried to run the examples, but I got error messages. Googling around it seemed to work better if I went one of

[web2py] Compartilhar aplicações feita em Web2py em Rede Local.

2019-03-28 Thread Alessandro dos Santos
Boa tarde! Fiz uma pequena aplicação utilizando web2py, e gostaria de compartilhar ela em rede local, lembrando que a rede no meu serviço é compartilhado por wifi sem IP. grato. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source