[web2py] Re: web2py 2.15.1 is OUT

2017-07-14 Thread Dave S
On Friday, July 14, 2017 at 1:12:39 AM UTC-7, Dave S wrote: > > > > On Thursday, July 13, 2017 at 6:20:21 PM UTC-7, Dave S wrote: >> >> >> >> On Thursday, July 13, 2017 at 2:43:57 PM UTC-7, Anthony wrote: >>> >>> Are you saying that used to work but doesn't any longer? >>> >>> >> There are 3 exam

[web2py] Re: How do I set the application that shows at domain root? Plus a couple other questions...

2017-07-14 Thread Bruce Whealton
On Friday, July 14, 2017 at 1:52:05 PM UTC-4, Anthony wrote: > > See http://web2py.com/books/default/chapter/29/04/the-core#Dispatching > and > http://web2py.com/books/default/chapter/29/04/the-core#Parameter-based-system > . > > If no app is specified, web2py looks for an app called "init", an

[web2py] Re: How do I set the application that shows at domain root? Plus a couple other questions...

2017-07-14 Thread Jim S
Have you not seen this? http://web2py.com/book -Jim On Friday, July 14, 2017 at 4:30:28 PM UTC-5, Bruce Whealton wrote: > > Thanks. I was actually just discovering this from both the Web2py > Cookbook book and from the manual/book version 5 available for dl as PDF. > :-) > I am curious that

[web2py] Re: How do I set the application that shows at domain root? Plus a couple other questions...

2017-07-14 Thread Bruce Whealton
Thanks. I was actually just discovering this from both the Web2py Cookbook book and from the manual/book version 5 available for dl as PDF. :-) I am curious that this manual has in the path name, /chapter/29/ as if it was part of a larger book. On Friday, July 14, 2017 at 1:45:29 PM UTC-4, Leon

[web2py] Re: how to optimize this query to get ids like [100,200,102,909] not [{'id':100,'id':200...}

2017-07-14 Thread Anthony
On Friday, July 14, 2017 at 11:56:57 AM UTC-4, Leonel Câmara wrote: > > The cleanest way is the little known and undocumented column: > > db(db.entities.type==5).select(db.entities.id).column() > And if you need to pick out a particular columns when there is more than one, you can do .column('col

[web2py] Re: How do I set the application that shows at domain root? Plus a couple other questions...

2017-07-14 Thread Anthony
On Friday, July 14, 2017 at 1:12:55 PM UTC-4, Bruce Whealton wrote: > > Hello all, > I am having trouble finding information about how to setup > what will show when a user comes to my domain, which is being served by > web2py. > Currently, I know how to create applications from a s

[web2py] Re: How do I set the application that shows at domain root? Plus a couple other questions...

2017-07-14 Thread Leonel Câmara
In regard to routing and setting up an application to be the one that will be shown when people go to your domain 1. Copy exampl/routes.parametric.example.py to web2pyfolder/routes.py 2. edit routes.py change: default_application='welcome' to default_application='your default application' --

[web2py] How do I set the application that shows at domain root? Plus a couple other questions...

2017-07-14 Thread Bruce Whealton
Hello all, I am having trouble finding information about how to setup what will show when a user comes to my domain, which is being served by web2py. Currently, I know how to create applications from a single install. I understand routing or redirects within an app. However, I c

[web2py] Re: how to optimize this query to get ids like [100,200,102,909] not [{'id':100,'id':200...}

2017-07-14 Thread Leonel Câmara
The cleanest way is the little known and undocumented column: db(db.entities.type==5).select(db.entities.id).column() Also if you are doing this to use in a belongs you don't need it, you can just do db(db.entities.type==5)._select(db.entities.id) -- Resources: - http://web2py.com - http://we

[web2py] how to optimize this query to get ids like [100,200,102,909] not [{'id':100,'id':200...}

2017-07-14 Thread António Ramos
this query ret=db(db.entities.type==5).select(db.entities.id).as_list() results in this [{'id': 100}, {'id': 200}, {'id': 909}] but i only want the result as [100,200,909] what is the cleanest way of doing it ? regards António -- Resources: - http://web2py.com - http://web2py.com/book (Doc

Re: [web2py] Re: Remove current element from IS_IN_DB validator content

2017-07-14 Thread tomasz bandura
It works, Thank you! 2017-07-14 13:12 GMT+02:00 Leonel Câmara : > Assuming request.args(0) is the id of the record you're editing you can > just do. > > db.next_step.requires = IS_IN_DB( db(db.t_step.id != request.args(0)),' > t_step.id',db.t_step.name) > > -- > Resources: > - http://web2py.com

[web2py] How to handle web2py_websocket connection lost

2017-07-14 Thread António Ramos
Hello how do i handle connection loss with websockets ? I´m using if(!web2py_websocket( so how do i code in the event of connection loss? regards António -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.

[web2py] Re: Remove current element from IS_IN_DB validator content

2017-07-14 Thread Leonel Câmara
Assuming request.args(0) is the id of the record you're editing you can just do. db.next_step.requires = IS_IN_DB( db(db.t_step.id != request.args(0)),'t_step.id',db.t_step.name) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sourc

[web2py] Re: web2py 2.15.1 is OUT

2017-07-14 Thread Dave S
On Thursday, July 13, 2017 at 5:17:11 PM UTC-7, Leonel Câmara wrote: > > Note this is deprecated: > > row = db().select(max) > > Calling db() like that without a query will break common filters for > instance. > Do we need another pull request on the book, since the examples are there? (They

[web2py] Re: web2py 2.15.1 is OUT

2017-07-14 Thread Dave S
On Thursday, July 13, 2017 at 6:20:21 PM UTC-7, Dave S wrote: > > > > On Thursday, July 13, 2017 at 2:43:57 PM UTC-7, Anthony wrote: >> >> Are you saying that used to work but doesn't any longer? >> >> > There are 3 examples in the book at the link. They work in 2.14.6 using > -S (and I did cut