Re: [web2py] Re: Web2py/DAL equivalent of "not in [a table]"

2019-05-14 Thread Eliezer (Vlad) Tseytkin
Oh, no problem, I've adjusted it for my case. My problem was that I wasn't aware about subqueries (_select vs. select), so that was the main take away :) On Wed, May 15, 2019, 1:28 AM Massimo Di Pierro wrote: > Something is wrong. You are searching that the id of one table is not the > id of

[web2py] Re: Https Apache Problem

2019-05-14 Thread Massimo Di Pierro
Please. Use nginx. There is no reason to use Apache any more in 2019. On Tuesday, 14 May 2019 22:28:55 UTC-7, Cris Fad wrote: > > Hello, > > I am trying to run w2p on apache. I do so by running the script > setup-web2py-ubuntu.sh in the folder web2py/scripts. It works fine for the > address

[web2py] https and apache

2019-05-14 Thread Cris Fad
Dear all, I have problems to access web2py on apache throught https. I run setup-web2py-ubuntu.sh, in the folder web2py/scripts and while the http is responding correctly the https is not. In this way I cannot start the admin page. The server is running Ubuntu 18.04. Thanks in advance

Re: [web2py] Re: Web2py/DAL equivalent of "not in [a table]"

2019-05-14 Thread Massimo Di Pierro
Something is wrong. You are searching that the id of one table is not the id of another table. But that is not a reference. On Tuesday, 14 May 2019 19:49:32 UTC-7, Vlad wrote: > > works like a charm! > thank you ! > > On Tue, May 14, 2019 at 7:16 PM Val K wrote: > >> should help: >> >>

[web2py] Re: self-reference not showing dropdown on form field

2019-05-14 Thread Isaac Batista
thxs, same problem. it has worked for me Em segunda-feira, 4 de março de 2013 10:34:14 UTC-3, Anthony escreveu: > > db.category.parent.requires = IS_EMPTY_OR(IS_IN_DB(db, 'category.category' > )) > > On Sunday, March 3, 2013 9:34:59 PM UTC-5, 黄祥 wrote: >> >> a, thank you so much for your detail

[web2py] Relate data in two different databases

2019-05-14 Thread Érique Moreira
Good afternoon I have 3 different databases that relate the risk stratification in the patient's oral health. 1) Patient registration 2) Stratification data (eg smoking, pain, cavities, water with fluoride, etc.) 3) stratification result (Low Risk, Medium Risk, High Risk) the BD 2 and 3

[web2py] Https Apache Problem

2019-05-14 Thread Cris Fad
Hello, I am trying to run w2p on apache. I do so by running the script setup-web2py-ubuntu.sh in the folder web2py/scripts. It works fine for the address http: but not for the https. Furthermore, due to this situation I cannot access the admin page. I am using server with Ubuntu 18.04

[web2py] Re: Vue2pyj - alternative web IDE

2019-05-14 Thread Massimo Di Pierro
Thanks. :-) On Tuesday, 14 May 2019 16:23:17 UTC-7, Val K wrote: > > I moved vue3pyj to separate repo : > https://github.com/valq7711/vue3pyj > > Delimiters are changed as you suggested > > On Tuesday, May 14, 2019 at 10:00:14 AM UTC+3, Massimo Di Pierro wrote: >> >> I've think we should adopt

[web2py] Re: Web3py

2019-05-14 Thread Massimo Di Pierro
web2py uses: (all defined in web3py/core.py) [100% done] pydal for DB [100%] pluralize for T [100%] yatl for template and helpers [100%] tornado as default web server (when no --number_workers) [100%] gevent + gunicorn when --number_workers is specified [100%] bottle for routing, request,

[web2py] Re: Block pages on time

2019-05-14 Thread Massimo Di Pierro
Intreresting raise redirect(...) and redirect() behave the same because the redirect function raises HTTP so the other raise is never excuted On Tuesday, 14 May 2019 07:40:47 UTC-7, Val K wrote: > > Yes, but without raise -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-14 Thread Massimo Di Pierro
We can change the name but api is too ambiguous. Any other idea? On Tuesday, 14 May 2019 05:34:33 UTC-7, Anthony wrote: > > Looks great. You might want to consider an alternative name to avoid > confusion with the Python DB-API > specification

Re: [web2py] Re: Web2py/DAL equivalent of "not in [a table]"

2019-05-14 Thread Eliezer (Vlad) Tseytkin
works like a charm! thank you ! On Tue, May 14, 2019 at 7:16 PM Val K wrote: > should help: > > sql_str = db()._select(db.tbl2.id) #note underscore before `select` > db(~db.tbl1.id.belongs(sql_str)).select(db.tbl1.id, db.tbl1.name) > > > > > > > On Wednesday, May 15, 2019 at 1:06:49 AM UTC+3,

[web2py] Re: Vue2pyj - alternative web IDE

2019-05-14 Thread Val K
I moved vue3pyj to separate repo : https://github.com/valq7711/vue3pyj Delimiters are changed as you suggested On Tuesday, May 14, 2019 at 10:00:14 AM UTC+3, Massimo Di Pierro wrote: > > I've think we should adopt the convention that [[ ]] are yatl delimiters > and {{ }} are Vue delimiters. >

[web2py] Re: Web2py/DAL equivalent of "not in [a table]"

2019-05-14 Thread Val K
should help: sql_str = db()._select(db.tbl2.id) #note underscore before `select` db(~db.tbl1.id.belongs(sql_str)).select(db.tbl1.id, db.tbl1.name) On Wednesday, May 15, 2019 at 1:06:49 AM UTC+3, Vlad wrote: > > What would be an equivalent of the following? > > SELECT ID, Name > FROM

[web2py] Web2py/DAL equivalent of "not in [a table]"

2019-05-14 Thread Vlad
What would be an equivalent of the following? SELECT ID, Name FROM Table1 WHERE ID NOT IN (SELECT ID FROM Table2) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Password File

2019-05-14 Thread Dave S
On Monday, May 13, 2019 at 6:50:40 PM UTC-7, Suhas Jadhav wrote: > > Hi Gurus, > In my web2py application, i am connecting to two different databases. > Currently, I am saving username and password in the code. > I want to use a password file or some other mean. Can you please help. > If you're

[web2py] Re: block entire app

2019-05-14 Thread Dave S
On Monday, May 13, 2019 at 8:44:54 PM UTC-7, lucas wrote: > > hey one and all, > > where, in what model or controller, is the best place to place a few lines > of code that captures every controller/function call in the entire app and > returns a single page with a line of text and link to

Re: [web2py] Re: authapi.py

2019-05-14 Thread Tito Garrido
Thank you, https://github.com/robertop23/web2py_vuejs_vuetify/blob/master/controllers/api.py works for me! On Mon, May 13, 2019 at 4:23 PM Val K wrote: > https://github.com/web2py/web2py/blob/4a90c82ee4271b2a17c187d41138a03249c14350/gluon/tools.py#L1002 > > > > > >

[web2py] Re: Web3py

2019-05-14 Thread En Ware
So I'm trying to figure out web3py libs and how everything works together. Web3py uses bottle for request, routes, and response. Web3py uses DAL or PyDAL for database abstraction. Is this still valid for Storage class ? https://web2py.readthedocs.io/en/latest/_modules/gluon/storage.html , I

[web2py] Re: Block pages on time

2019-05-14 Thread Val K
Yes, but without raise -- 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] Re: Web3py

2019-05-14 Thread 黄祥
pls ignore my previous report about web3py tests folder, pardon, done it in wrong way, my bad, here is the correct one docker pull ubuntu docker run -it --privileged ubuntu /bin/bash apt update apt install -y git python3-pip memcached service memcached restart cd git clone

[web2py] Re: Web3py

2019-05-14 Thread En Ware
The editing is very fast and reloads on the fly. This is pretty impressive. On Tuesday, May 14, 2019 at 9:05:58 AM UTC-5, En Ware wrote: > > Ok very good, I created the directories and launched again and i can get > to the _dashboard instance, thanks > > On Tuesday, May 14, 2019 at 8:58:44 AM

Re: [web2py] Re: RESTful service with access control

2019-05-14 Thread Jim S
Yes, I have the view set. I have it working now if I use the password stored in my auth_user table. But, I'd really prefer to have it go through all available authentication methods to authenticate a user. We have some users that authenticate to our mail server and others that use the

[web2py] Re: Web3py

2019-05-14 Thread En Ware
Ok very good, I created the directories and launched again and i can get to the _dashboard instance, thanks On Tuesday, May 14, 2019 at 8:58:44 AM UTC-5, 黄祥 wrote: > > pls try: > *need an extra steps to make web3py start in latest commit (101)* > git clone https://github.com/web2py/web3py > cd

[web2py] Re: Block pages on time

2019-05-14 Thread Константин Комков
Maybe I can use it? raise redirect(URL('static','403.html')) -- 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

[web2py] Re: Web3py

2019-05-14 Thread 黄祥
pls try: *need an extra steps to make web3py start in latest commit (101)* git clone https://github.com/web2py/web3py cd web3py pip3 install -r requirements.txt mkdir applications/_dashboard/translations mkdir applications/_scaffold/databases mkdir applications/toys/databases ./web3py-start

[web2py] Re: Web3py

2019-05-14 Thread En Ware
still getting same errors pip3 install -r requirements.txt Requirement already satisfied: pydal>=19.5.9 in /Users/aaronm/.pyenv/versions/3.6.4/envs/web3py/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (19.5.9) Requirement already satisfied: pyjwt in

[web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-14 Thread Anthony
Looks great. You might want to consider an alternative name to avoid confusion with the Python DB-API specification (maybe just call the class API -- i.e., pydal.API rather than pydal.DBAPI). On Tuesday, May 14, 2019 at 2:18:42 AM UTC-4,

[web2py] Re: gluon.contrib.pymysql.err.Error AssertionError('Protocol error, expecting EOF',)

2019-05-14 Thread Gilad Hoshmand
Solved. The problem was that I was addressing 'single_value_field' without the context of the derived table. Changed: JOIN table2 ON (table2.id = single_value_field) To: JOIN table2 ON (table2.id = *new_table_alias*.single_value_field) On Monday, May 13, 2019 at 6:14:08 PM UTC+3, Gilad

Re: [web2py] Re: RESTful service with access control

2019-05-14 Thread Jim Steil
Massimo - thanks for that info. This won't help in my case as I'm using the RESTful API to get access to another of my server-side python packages. But, I can see the power of the DBAPI. I'm waiting for you to stabilize web3py before I jump in. I'd love to get involved in more testing but I

[web2py] Re: Block pages on time

2019-05-14 Thread Константин Комков
Thank you! I do like that: interval = db().select(db.t_admission_schedule.BEGINNING,db.t_admission_schedule.END_APP,orderby=~db.t_admission_schedule.END_APP).first() if ((datetime.datetime.now().date()interval.END_APP)): raise HTTP(403) One more question. Now I see "*403 FORBIDDEN*", but if I

[web2py] Block pages on time

2019-05-14 Thread Val K
Just place raise HTTP(403,'blah') at first line of the controller -- 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

[web2py] Block pages on time

2019-05-14 Thread Константин Комков
Hello! I have that page: https://oas.timacad.ru/application. default.py: *def index():interval = db().select(db.t_admission_schedule.BEGINNING,db.t_admission_schedule.END_APP,orderby=~db.t_admission_schedule.END_APP).first() if

[web2py] Re: Vue2pyj - alternative web IDE

2019-05-14 Thread Val K
OK, I'll fix it -- 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] Re: Vue2pyj - alternative web IDE

2019-05-14 Thread Massimo Di Pierro
I've think we should adopt the convention that [[ ]] are yatl delimiters and {{ }} are Vue delimiters. -- 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) ---

[web2py] Re: RESTful service with access control

2019-05-14 Thread Massimo Di Pierro
You may want to see my other post about the new policy based DBAPI. On Monday, 13 May 2019 09:28:11 UTC-7, Jim S wrote: > > Hi > > I'm setting up a REST service that requires authentication. I'm following > the example here: > >

[web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-14 Thread Massimo Di Pierro
For more examples look at the tests: https://github.com/web2py/pydal/blob/master/tests/dbapi.py On Monday, 13 May 2019 23:18:42 UTC-7, Massimo Di Pierro wrote: > > You may have missed this but there is a new functionality in PyDAL that > allows you to create very powerful APIs. It is called

[web2py] new DBAPI in pydal for both web2py and web3py

2019-05-14 Thread Massimo Di Pierro
You may have missed this but there is a new functionality in PyDAL that allows you to create very powerful APIs. It is called DBAPI. It is still not 100% stable but it is working and I could use some help testing it. web3py's equivalent of appadmin will be called dbadmin (90% done) and it is