[web2py] Re: web3py -> py4web

2019-09-03 Thread mostwanted
Beautiful, can't wait for a complete project

Mostwanted

On Wednesday, July 24, 2019 at 7:40:27 AM UTC+2, Massimo Di Pierro wrote:
>
> OK. I know. I am not good with names. 
> But there are lots of requirements to be fulfilled.
> py4web.com was available and the pypi package was available.
> Here is running on google cloud:
> http://py4web.com/
>
> Ducking...
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e75f9518-ff1b-4146-a07c-0de5e093b279%40googlegroups.com.


[web2py] Re: web3py -> py4web

2019-09-02 Thread Klaus Zinser
For both PCs (OSX) I tried to tidy up. With AppCleaner in programs all 
Python (except 3.7) was removed. 
Whats initially coming with Apple OSX will stay and being updated. 
(Currently: Python 2.7.16 (v2.7.16:413a49145e, Mar  2 2019, 15:28:37) [GCC 
4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

Then from python org the most recent python was installed. Currently 
Version 3.7.4. 


Now in the terminal window 
A: entering: python   -> Python 2.7.16 (v2.7.16:413a49145e, Mar  2 2019, 
15:28:37) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
B: entering python3  -> Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 
14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin

Now, install one of the 4 solutions. Possibly the most easiest is (not 
working before): 

' workflow 1) pip only' (see thread entry 31. Aug here)

python3 -m pip install py4web
py4web-start apps (apps will be created for you)'

It works. On a new macmini (10.14.6) 2018 and on a mid 2010 Macbook (OSX 
10.13.6). (re 'very old pydal version' on the notebook, the web2py.app was 
copied to the notebook prog folder). 
Writing these details should be no advertisement for the company. Most 
realistic the next notebook won't come from them. 

So the infrastructure seems to be fine. On both PCs py4web and web2py is 
working,  



Am Montag, 2. September 2019 04:21:18 UTC+2 schrieb Massimo Di Pierro:
>
> I think this error
>
> AttributeError: type object 'DAL' has no attribute 'Field'
>
> means you have some very very old version of pydal. Is that possible?
>
> On Sunday, 1 September 2019 02:14:38 UTC-7, Klaus Zinser wrote:
>>
>> Thats was working on the Desktop:
>>  
>> workflow 4) from source and install
>>
>> git clone https://github.com/web2py/py4web.git
>>
>> cd py4web
>> make install
>> cd ..
>> mkdir work
>> cd work
>> py4web-start apps
>>
>> For me thats fine and I don't want the risk to destroy. I need to make 
>> sure to keep the code actual. Nothing happenened on this: ./py4web-start 
>> app.py
>>
>> Nevertheless, that was on the desktop. I tried on the notebook: 
>>
>> workflow 1) pip only
>> python3 -m pip install py4web
>> py4web-start apps
>> (apps will be created for you)
>>
>> zvkmcbk:~ klauszinser$ py4web-start app.py
>> Traceback (most recent call last):
>>  File 
>> "/Library/Frameworks/Python.framework/Versions/3.6/bin/py4web-start", line 
>> 11, in 
>> ...  
>> File 
>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/py4web/__init__.py",
>>  
>> line 1, in 
>>from . core import (
>>  File 
>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/py4web/core.py",
>>  
>> line 209, in 
>>setattr(pydal.DAL.Field, _, threadsafevariable.ThreadSafeVariable())
>> AttributeError: type object 'DAL' has no attribute 'Field'
>> zvkmcbk:~ klauszinser$
>>
>> Right now I am fine as the desktop is working. I will play around with 
>> the notebook and try 1) pip ony setup.
>>
>> For me its now a low priority. 
>>
>> Thank you, Klaus 
>>
>> -
>>
>> Am Sonntag, 1. September 2019 04:50:09 UTC+2 schrieb Massimo Di Pierro:
>>>
>>> This is my bad. We just renamed
>>>
>>> ./py4web-start to ./py4web-start app.py
>>>
>>> the reason is that windows did not understand the former. Does this 
>>> solver the problems?
>>>
>>> On Saturday, 31 August 2019 14:45:14 UTC-7, Klaus Zinser wrote:

 Thanks Val, thanks Massimo,
 as there was the chance to tidy up I took the approach from Massimo. 

 First I tried 
 py4web-start apps -> working
 ./py4web-start apps -> not working
 Then I tried to tidy up. Most realistic I 
 #1 deleted the venv (virtual environment), 
 #2 removed the folder 
 #3 uninstalled
 The I rebooted OSX. 

 When choosing 1) pip only I got these messages: 

 You are using pip version 19.0.3, however version 19.2.3 is available.

 You should consider upgrading via the 'pip install --upgrade pip' 
 command.

 KlMcM:~ klausv.zinser$ pip install --upgrade pip

 DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 
 2020. Please upgrade your Python as Python 2.7 won't be maintained after 
 that date. A future version of pip will drop support for Python 2.7. More 
 details about Python 2 support in pip, can be found at 
 https://pip.pypa.io/en/latest/development/release-process/#python-2-support

 Requirement already up-to-date: pip in 
 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
  
 (19.2.3)

 KlMcM:~ klausv.zinser$ py4web-start apps

 -bash: py4web-start: command not found
 Neither ./py4web-start apps or py4web-start apps was working. 

 When reviewing what I had done before to install and what I 
 uninstalled: python3 -m pip uninstall py4web  
 I went for workflow 4) from source and install (as I had done this 
 before). 
 That was working,

 I don't 

[web2py] Re: web3py -> py4web

2019-09-01 Thread Massimo Di Pierro
I think this error

AttributeError: type object 'DAL' has no attribute 'Field'

means you have some very very old version of pydal. Is that possible?

On Sunday, 1 September 2019 02:14:38 UTC-7, Klaus Zinser wrote:
>
> Thats was working on the Desktop:
>  
> workflow 4) from source and install
>
> git clone https://github.com/web2py/py4web.git
>
> cd py4web
> make install
> cd ..
> mkdir work
> cd work
> py4web-start apps
>
> For me thats fine and I don't want the risk to destroy. I need to make 
> sure to keep the code actual. Nothing happenened on this: ./py4web-start 
> app.py
>
> Nevertheless, that was on the desktop. I tried on the notebook: 
>
> workflow 1) pip only
> python3 -m pip install py4web
> py4web-start apps
> (apps will be created for you)
>
> zvkmcbk:~ klauszinser$ py4web-start app.py
> Traceback (most recent call last):
>  File 
> "/Library/Frameworks/Python.framework/Versions/3.6/bin/py4web-start", line 
> 11, in 
> ...  
> File 
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/py4web/__init__.py",
>  
> line 1, in 
>from . core import (
>  File 
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/py4web/core.py",
>  
> line 209, in 
>setattr(pydal.DAL.Field, _, threadsafevariable.ThreadSafeVariable())
> AttributeError: type object 'DAL' has no attribute 'Field'
> zvkmcbk:~ klauszinser$
>
> Right now I am fine as the desktop is working. I will play around with the 
> notebook and try 1) pip ony setup.
>
> For me its now a low priority. 
>
> Thank you, Klaus 
>
> -
>
> Am Sonntag, 1. September 2019 04:50:09 UTC+2 schrieb Massimo Di Pierro:
>>
>> This is my bad. We just renamed
>>
>> ./py4web-start to ./py4web-start app.py
>>
>> the reason is that windows did not understand the former. Does this 
>> solver the problems?
>>
>> On Saturday, 31 August 2019 14:45:14 UTC-7, Klaus Zinser wrote:
>>>
>>> Thanks Val, thanks Massimo,
>>> as there was the chance to tidy up I took the approach from Massimo. 
>>>
>>> First I tried 
>>> py4web-start apps -> working
>>> ./py4web-start apps -> not working
>>> Then I tried to tidy up. Most realistic I 
>>> #1 deleted the venv (virtual environment), 
>>> #2 removed the folder 
>>> #3 uninstalled
>>> The I rebooted OSX. 
>>>
>>> When choosing 1) pip only I got these messages: 
>>>
>>> You are using pip version 19.0.3, however version 19.2.3 is available.
>>>
>>> You should consider upgrading via the 'pip install --upgrade pip' 
>>> command.
>>>
>>> KlMcM:~ klausv.zinser$ pip install --upgrade pip
>>>
>>> DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 
>>> 2020. Please upgrade your Python as Python 2.7 won't be maintained after 
>>> that date. A future version of pip will drop support for Python 2.7. More 
>>> details about Python 2 support in pip, can be found at 
>>> https://pip.pypa.io/en/latest/development/release-process/#python-2-support
>>>
>>> Requirement already up-to-date: pip in 
>>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
>>>  
>>> (19.2.3)
>>>
>>> KlMcM:~ klausv.zinser$ py4web-start apps
>>>
>>> -bash: py4web-start: command not found
>>> Neither ./py4web-start apps or py4web-start apps was working. 
>>>
>>> When reviewing what I had done before to install and what I uninstalled: 
>>> python3 
>>> -m pip uninstall py4web  
>>> I went for workflow 4) from source and install (as I had done this 
>>> before). 
>>> That was working,
>>>
>>> I don't want to take too much of your time. So this is fine for me. As I 
>>> am working on web2py with JSON and D3 I should try to have something 
>>> similar working. 
>>>
>>> But if you want me to test some issues let me know (pip only would be 
>>> the cleanest solution; again its fine what I have). 
>>>
>>> Klaus
>>>
>>>  
>>>
>>> Am Samstag, 31. August 2019 21:10:29 UTC+2 schrieb Massimo Di Pierro:

 I believe you have two (or three) versions installed. One installed 
 from pip and one local (downloaded from github).

 when you start it with

 py4web-start apps

 (without the ./ you are using the pip installed one)
 when you start it with

 ./py4web-start apps

 you are using the git one.
 If you use source bin/activate it means you have a venv and maybe you 
 have another version installed in the venv.

 One of those versions may be old and missing the py4web/__init__.py 
 file.

 I recommend you cleanup house:
 1) remove the venv
 2) remove the py4web folder
 3) python3 -m pip uninstall py4web (from outside the py4web folder)

 Then choose what preferred workflow: pip, venv+pip, or source. Do not 
 mix them up. If you want to try different workflows, use different 
 folders. 
 pip gets confused when you have the code checkout in the same folder where 
 you run pip.

 workflow 1) pip only

 python3 -m pip install py4web
 

[web2py] Re: web3py -> py4web

2019-09-01 Thread Klaus Zinser
Thats was working on the Desktop:
 
workflow 4) from source and install

git clone https://github.com/web2py/py4web.git

cd py4web
make install
cd ..
mkdir work
cd work
py4web-start apps

For me thats fine and I don't want the risk to destroy. I need to make sure 
to keep the code actual. Nothing happenened on this: ./py4web-start app.py

Nevertheless, that was on the desktop. I tried on the notebook: 

workflow 1) pip only

python3 -m pip install py4web
py4web-start apps
(apps will be created for you)

zvkmcbk:~ klauszinser$ py4web-start app.py
Traceback (most recent call last):
 File "/Library/Frameworks/Python.framework/Versions/3.6/bin/py4web-start", 
line 11, in 
...  
File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/py4web/__init__.py",
 
line 1, in 
   from . core import (
 File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/py4web/core.py",
 
line 209, in 
   setattr(pydal.DAL.Field, _, threadsafevariable.ThreadSafeVariable())
AttributeError: type object 'DAL' has no attribute 'Field'
zvkmcbk:~ klauszinser$

Right now I am fine as the desktop is working. I will play around with the 
notebook and try 1) pip ony setup.

For me its now a low priority. 

Thank you, Klaus 

-

Am Sonntag, 1. September 2019 04:50:09 UTC+2 schrieb Massimo Di Pierro:
>
> This is my bad. We just renamed
>
> ./py4web-start to ./py4web-start app.py
>
> the reason is that windows did not understand the former. Does this solver 
> the problems?
>
> On Saturday, 31 August 2019 14:45:14 UTC-7, Klaus Zinser wrote:
>>
>> Thanks Val, thanks Massimo,
>> as there was the chance to tidy up I took the approach from Massimo. 
>>
>> First I tried 
>> py4web-start apps -> working
>> ./py4web-start apps -> not working
>> Then I tried to tidy up. Most realistic I 
>> #1 deleted the venv (virtual environment), 
>> #2 removed the folder 
>> #3 uninstalled
>> The I rebooted OSX. 
>>
>> When choosing 1) pip only I got these messages: 
>>
>> You are using pip version 19.0.3, however version 19.2.3 is available.
>>
>> You should consider upgrading via the 'pip install --upgrade pip' command.
>>
>> KlMcM:~ klausv.zinser$ pip install --upgrade pip
>>
>> DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 
>> 2020. Please upgrade your Python as Python 2.7 won't be maintained after 
>> that date. A future version of pip will drop support for Python 2.7. More 
>> details about Python 2 support in pip, can be found at 
>> https://pip.pypa.io/en/latest/development/release-process/#python-2-support
>>
>> Requirement already up-to-date: pip in 
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
>>  
>> (19.2.3)
>>
>> KlMcM:~ klausv.zinser$ py4web-start apps
>>
>> -bash: py4web-start: command not found
>> Neither ./py4web-start apps or py4web-start apps was working. 
>>
>> When reviewing what I had done before to install and what I uninstalled: 
>> python3 
>> -m pip uninstall py4web  
>> I went for workflow 4) from source and install (as I had done this 
>> before). 
>> That was working,
>>
>> I don't want to take too much of your time. So this is fine for me. As I 
>> am working on web2py with JSON and D3 I should try to have something 
>> similar working. 
>>
>> But if you want me to test some issues let me know (pip only would be the 
>> cleanest solution; again its fine what I have). 
>>
>> Klaus
>>
>>  
>>
>> Am Samstag, 31. August 2019 21:10:29 UTC+2 schrieb Massimo Di Pierro:
>>>
>>> I believe you have two (or three) versions installed. One installed from 
>>> pip and one local (downloaded from github).
>>>
>>> when you start it with
>>>
>>> py4web-start apps
>>>
>>> (without the ./ you are using the pip installed one)
>>> when you start it with
>>>
>>> ./py4web-start apps
>>>
>>> you are using the git one.
>>> If you use source bin/activate it means you have a venv and maybe you 
>>> have another version installed in the venv.
>>>
>>> One of those versions may be old and missing the py4web/__init__.py file.
>>>
>>> I recommend you cleanup house:
>>> 1) remove the venv
>>> 2) remove the py4web folder
>>> 3) python3 -m pip uninstall py4web (from outside the py4web folder)
>>>
>>> Then choose what preferred workflow: pip, venv+pip, or source. Do not 
>>> mix them up. If you want to try different workflows, use different folders. 
>>> pip gets confused when you have the code checkout in the same folder where 
>>> you run pip.
>>>
>>> workflow 1) pip only
>>>
>>> python3 -m pip install py4web
>>> py4web-start apps
>>> (apps will be created for you)
>>>
>>> workflow 2) venv+pip
>>>
>>> mkdir work
>>> cd work
>>> python3 -m venv venv
>>> source venv/bin/activate
>>> python -m pip install py4web
>>> py4web-start apps
>>> (apps will be created for you)
>>>
>>> workflow 3) from source
>>>
>>> git clone https://github.com/web2py/py4web.git
>>>
>>> cd py4web
>>> make test
>>> python3 ./py4web-start apps
>>> (this will not 

[web2py] Re: web3py -> py4web

2019-08-31 Thread Massimo Di Pierro
This is my bad. We just renamed

./py4web-start to ./py4web-start app.py

the reason is that windows did not understand the former. Does this solver 
the problems?

On Saturday, 31 August 2019 14:45:14 UTC-7, Klaus Zinser wrote:
>
> Thanks Val, thanks Massimo,
> as there was the chance to tidy up I took the approach from Massimo. 
>
> First I tried 
> py4web-start apps -> working
> ./py4web-start apps -> not working
> Then I tried to tidy up. Most realistic I 
> #1 deleted the venv (virtual environment), 
> #2 removed the folder 
> #3 uninstalled
> The I rebooted OSX. 
>
> When choosing 1) pip only I got these messages: 
>
> You are using pip version 19.0.3, however version 19.2.3 is available.
>
> You should consider upgrading via the 'pip install --upgrade pip' command.
>
> KlMcM:~ klausv.zinser$ pip install --upgrade pip
>
> DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 
> 2020. Please upgrade your Python as Python 2.7 won't be maintained after 
> that date. A future version of pip will drop support for Python 2.7. More 
> details about Python 2 support in pip, can be found at 
> https://pip.pypa.io/en/latest/development/release-process/#python-2-support
>
> Requirement already up-to-date: pip in 
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages 
> (19.2.3)
>
> KlMcM:~ klausv.zinser$ py4web-start apps
>
> -bash: py4web-start: command not found
> Neither ./py4web-start apps or py4web-start apps was working. 
>
> When reviewing what I had done before to install and what I uninstalled: 
> python3 
> -m pip uninstall py4web  
> I went for workflow 4) from source and install (as I had done this 
> before). 
> That was working,
>
> I don't want to take too much of your time. So this is fine for me. As I 
> am working on web2py with JSON and D3 I should try to have something 
> similar working. 
>
> But if you want me to test some issues let me know (pip only would be the 
> cleanest solution; again its fine what I have). 
>
> Klaus
>
>  
>
> Am Samstag, 31. August 2019 21:10:29 UTC+2 schrieb Massimo Di Pierro:
>>
>> I believe you have two (or three) versions installed. One installed from 
>> pip and one local (downloaded from github).
>>
>> when you start it with
>>
>> py4web-start apps
>>
>> (without the ./ you are using the pip installed one)
>> when you start it with
>>
>> ./py4web-start apps
>>
>> you are using the git one.
>> If you use source bin/activate it means you have a venv and maybe you 
>> have another version installed in the venv.
>>
>> One of those versions may be old and missing the py4web/__init__.py file.
>>
>> I recommend you cleanup house:
>> 1) remove the venv
>> 2) remove the py4web folder
>> 3) python3 -m pip uninstall py4web (from outside the py4web folder)
>>
>> Then choose what preferred workflow: pip, venv+pip, or source. Do not mix 
>> them up. If you want to try different workflows, use different folders. pip 
>> gets confused when you have the code checkout in the same folder where you 
>> run pip.
>>
>> workflow 1) pip only
>>
>> python3 -m pip install py4web
>> py4web-start apps
>> (apps will be created for you)
>>
>> workflow 2) venv+pip
>>
>> mkdir work
>> cd work
>> python3 -m venv venv
>> source venv/bin/activate
>> python -m pip install py4web
>> py4web-start apps
>> (apps will be created for you)
>>
>> workflow 3) from source
>>
>> git clone https://github.com/web2py/py4web.git
>>
>> cd py4web
>> make test
>> python3 ./py4web-start apps
>> (this will not create apps but will find the downloaded ones)
>>
>> workflow 4) from source and install
>>
>> git clone https://github.com/web2py/py4web.git
>>
>> cd py4web
>> make install
>> cd ..
>> mkdir work
>> cd work
>> py4web-start apps
>>
>>
>>
>> On Saturday, 31 August 2019 02:36:35 UTC-7, Klaus Zinser wrote:
>>>
>>> Using: 
>>> python3 -m pip install py4web --upgrade  worked. 
>>>
>>> But i was unsucessful with these two commands:
>>> source bin/activate 
>>>./py4web-start apps / 
>>>
>>> Then I used: 
>>>
>>> git clone https://github.com/web2py/py4web.git
>>> cd py4web
>>> python3 -m pip install -r requirements.txt
>>> python3 setup.py install
>>>
>>>
>>> and finelly: 
>>>
>>> py4web-start apps
>>>
>>>
>>> It came up but I was unsucessful when entering the requested one-time 
>>> dashboard password.
>>>
>>>
>>> KlMcM:py4web klausxx$ py4web-start apps
>>>
>>>
>>> ██╗ ██╗   ██╗██╗  ██╗██╗██╗███╗██╗
>>>
>>> ██╔══██╗╚██╗ ██╔╝██║  ██║██║██║██╔╝██╔══██
>>>
>>> ██╔╝ ╚╔╝ ███║██║ █╗ ██║█╗  ██╔╝
>>>
>>> ██╔═══╝   ╚██╔╝  ╚██║██║███╗██║██╔══╝  ██╔══██╗
>>>
>>> ██║██║██║╚███╔███╔╝███╗██╔╝
>>>
>>> ╚═╝╚═╝╚═╝ ╚══╝╚══╝ ╚══╝╚═╝ 
>>>
>>> It is still experimental...
>>>
>>> assets-folder: 
>>> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/assets
>>>
>>> Choose a one-time dashboad password: ONETIMEPW
>>>
>>> Dashboard is at: 

[web2py] Re: web3py -> py4web

2019-08-31 Thread Klaus Zinser
Thanks Val, thanks Massimo,
as there was the chance to tidy up I took the approach from Massimo. 

First I tried 
py4web-start apps -> working
./py4web-start apps -> not working
Then I tried to tidy up. Most realistic I 
#1 deleted the venv (virtual environment), 
#2 removed the folder 
#3 uninstalled
The I rebooted OSX. 

When choosing 1) pip only I got these messages: 

You are using pip version 19.0.3, however version 19.2.3 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

KlMcM:~ klausv.zinser$ pip install --upgrade pip

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 
2020. Please upgrade your Python as Python 2.7 won't be maintained after 
that date. A future version of pip will drop support for Python 2.7. More 
details about Python 2 support in pip, can be found at 
https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Requirement already up-to-date: pip in 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages 
(19.2.3)

KlMcM:~ klausv.zinser$ py4web-start apps

-bash: py4web-start: command not found
Neither ./py4web-start apps or py4web-start apps was working. 

When reviewing what I had done before to install and what I uninstalled: 
python3 
-m pip uninstall py4web  
I went for workflow 4) from source and install (as I had done this before). 
That was working,

I don't want to take too much of your time. So this is fine for me. As I am 
working on web2py with JSON and D3 I should try to have something similar 
working. 

But if you want me to test some issues let me know (pip only would be the 
cleanest solution; again its fine what I have). 

Klaus

 

Am Samstag, 31. August 2019 21:10:29 UTC+2 schrieb Massimo Di Pierro:
>
> I believe you have two (or three) versions installed. One installed from 
> pip and one local (downloaded from github).
>
> when you start it with
>
> py4web-start apps
>
> (without the ./ you are using the pip installed one)
> when you start it with
>
> ./py4web-start apps
>
> you are using the git one.
> If you use source bin/activate it means you have a venv and maybe you have 
> another version installed in the venv.
>
> One of those versions may be old and missing the py4web/__init__.py file.
>
> I recommend you cleanup house:
> 1) remove the venv
> 2) remove the py4web folder
> 3) python3 -m pip uninstall py4web (from outside the py4web folder)
>
> Then choose what preferred workflow: pip, venv+pip, or source. Do not mix 
> them up. If you want to try different workflows, use different folders. pip 
> gets confused when you have the code checkout in the same folder where you 
> run pip.
>
> workflow 1) pip only
>
> python3 -m pip install py4web
> py4web-start apps
> (apps will be created for you)
>
> workflow 2) venv+pip
>
> mkdir work
> cd work
> python3 -m venv venv
> source venv/bin/activate
> python -m pip install py4web
> py4web-start apps
> (apps will be created for you)
>
> workflow 3) from source
>
> git clone https://github.com/web2py/py4web.git
>
> cd py4web
> make test
> python3 ./py4web-start apps
> (this will not create apps but will find the downloaded ones)
>
> workflow 4) from source and install
>
> git clone https://github.com/web2py/py4web.git
>
> cd py4web
> make install
> cd ..
> mkdir work
> cd work
> py4web-start apps
>
>
>
> On Saturday, 31 August 2019 02:36:35 UTC-7, Klaus Zinser wrote:
>>
>> Using: 
>> python3 -m pip install py4web --upgrade  worked. 
>>
>> But i was unsucessful with these two commands:
>> source bin/activate 
>>./py4web-start apps / 
>>
>> Then I used: 
>>
>> git clone https://github.com/web2py/py4web.git
>> cd py4web
>> python3 -m pip install -r requirements.txt
>> python3 setup.py install
>>
>>
>> and finelly: 
>>
>> py4web-start apps
>>
>>
>> It came up but I was unsucessful when entering the requested one-time 
>> dashboard password.
>>
>>
>> KlMcM:py4web klausxx$ py4web-start apps
>>
>>
>> ██╗ ██╗   ██╗██╗  ██╗██╗██╗███╗██╗
>>
>> ██╔══██╗╚██╗ ██╔╝██║  ██║██║██║██╔╝██╔══██
>>
>> ██╔╝ ╚╔╝ ███║██║ █╗ ██║█╗  ██╔╝
>>
>> ██╔═══╝   ╚██╔╝  ╚██║██║███╗██║██╔══╝  ██╔══██╗
>>
>> ██║██║██║╚███╔███╔╝███╗██╔╝
>>
>> ╚═╝╚═╝╚═╝ ╚══╝╚══╝ ╚══╝╚═╝ 
>>
>> It is still experimental...
>>
>> assets-folder: 
>> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/assets
>>
>> Choose a one-time dashboad password: ONETIMEPW
>>
>> Dashboard is at: http://127.0.0.1:8000/_dashboard
>>
>> Traceback (most recent call last):
>>
>>   File "/Library/Frameworks/Python.framework/Versions/3.7/bin/py4web-start", 
>> line 11, in 
>>
>> load_entry_point('py4web==0.1.20190826.1', 'console_scripts', 
>> 'py4web-start')()
>>
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/core.py",
>>  line 816, in main
>>
>> Reloader.import_apps()
>>
>>   File 

[web2py] Re: web3py -> py4web

2019-08-31 Thread Massimo Di Pierro
I believe you have two (or three) versions installed. One installed from 
pip and one local (downloaded from github).

when you start it with

py4web-start apps

(without the ./ you are using the pip installed one)
when you start it with

./py4web-start apps

you are using the git one.
If you use source bin/activate it means you have a venv and maybe you have 
another version installed in the venv.

One of those versions may be old and missing the py4web/__init__.py file.

I recommend you cleanup house:
1) remove the venv
2) remove the py4web folder
3) python3 -m pip uninstall py4web (from outside the py4web folder)

Then choose what preferred workflow: pip, venv+pip, or source. Do not mix 
them up. If you want to try different workflows, use different folders. pip 
gets confused when you have the code checkout in the same folder where you 
run pip.

workflow 1) pip only

python3 -m pip install py4web
py4web-start apps
(apps will be created for you)

workflow 2) venv+pip

mkdir work
cd work
python3 -m venv venv
source venv/bin/activate
python -m pip install py4web
py4web-start apps
(apps will be created for you)

workflow 3) from source

git clone https://github.com/web2py/py4web.git

cd py4web
make test
python3 ./py4web-start apps
(this will not create apps but will find the downloaded ones)

workflow 4) from source and install

git clone https://github.com/web2py/py4web.git

cd py4web
make install
cd ..
mkdir work
cd work
py4web-start apps



On Saturday, 31 August 2019 02:36:35 UTC-7, Klaus Zinser wrote:
>
> Using: 
> python3 -m pip install py4web --upgrade  worked. 
>
> But i was unsucessful with these two commands:
> source bin/activate 
>./py4web-start apps / 
>
> Then I used: 
>
> git clone https://github.com/web2py/py4web.git
> cd py4web
> python3 -m pip install -r requirements.txt
> python3 setup.py install
>
>
> and finelly: 
>
> py4web-start apps
>
>
> It came up but I was unsucessful when entering the requested one-time 
> dashboard password.
>
>
> KlMcM:py4web klausxx$ py4web-start apps
>
>
> ██╗ ██╗   ██╗██╗  ██╗██╗██╗███╗██╗
>
> ██╔══██╗╚██╗ ██╔╝██║  ██║██║██║██╔╝██╔══██
>
> ██╔╝ ╚╔╝ ███║██║ █╗ ██║█╗  ██╔╝
>
> ██╔═══╝   ╚██╔╝  ╚██║██║███╗██║██╔══╝  ██╔══██╗
>
> ██║██║██║╚███╔███╔╝███╗██╔╝
>
> ╚═╝╚═╝╚═╝ ╚══╝╚══╝ ╚══╝╚═╝ 
>
> It is still experimental...
>
> assets-folder: 
> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/assets
>
> Choose a one-time dashboad password: ONETIMEPW
>
> Dashboard is at: http://127.0.0.1:8000/_dashboard
>
> Traceback (most recent call last):
>
>   File "/Library/Frameworks/Python.framework/Versions/3.7/bin/py4web-start", 
> line 11, in 
>
> load_entry_point('py4web==0.1.20190826.1', 'console_scripts', 
> 'py4web-start')()
>
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/core.py",
>  line 816, in main
>
> Reloader.import_apps()
>
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/core.py",
>  line 661, in import_apps
>
> 'apps', path).load_module()
>
>   File "", line 407, in 
> _check_name_wrapper
>
>   File "", line 907, in load_module
>
>   File "", line 732, in load_module
>
>   File "", line 265, in _load_module_shim
>
>   File "", line 696, in _load
>
>   File "", line 677, in _load_unlocked
>
>   File "", line 724, in exec_module
>
>   File "", line 859, in get_code
>
>   File "", line 916, in get_data
>
> FileNotFoundError: [Errno 2] No such file or directory: 
> '/Users/klausxx/py4web/apps/__init__.py'
>
> KlMcM:py4web klausxx$ 
>
>
> Klaus
>
>
>
> -
>
>
> Am Montag, 26. August 2019 19:05:24 UTC+2 schrieb En Ware:
>>
>> hmm , I just tried from pip and works find 
>>
>> python3 -m pip install py4web --upgrade 
>>
>> source bin/activate 
>>
>> ./py4web-start apps / 
>>
>>
>> ██╗ ██╗   ██╗██╗  ██╗██╗██╗███╗██╗ 
>> ██╔══██╗╚██╗ ██╔╝██║  ██║██║██║██╔╝██╔══██╗
>> ██╔╝ ╚╔╝ ███║██║ █╗ ██║█╗  ██╔╝
>> ██╔═══╝   ╚██╔╝  ╚██║██║███╗██║██╔══╝  ██╔══██╗
>> ██║██║██║╚███╔███╔╝███╗██╔╝
>> ╚═╝╚═╝╚═╝ ╚══╝╚══╝ ╚══╝╚═╝ 
>> It is still experimental...
>>
>> assets-folder: 
>> /Users/.env/python/py4web/lib/python3.6/site-packages/py4web/assets
>> Choose a one-time dashboad password: 
>> Dashboard is at: http://127.0.0.1:8000/_dashboard
>> [X] loaded _dashboard 
>> [X] loaded myapp 
>> [X] loaded _default 
>> [X] loaded _scaffold 
>> Bottle v0.12.17 server starting up (using TornadoServer())...
>> Listening on http://127.0.0.1:8000/
>> Hit Ctrl-C to quit.
>>
>>
>>
>> On Wednesday, August 21, 2019 at 10:51:31 AM UTC-5, Annet wrote:
>>>
>>>
>>> python3 setup.py install

>>>
>>> I installed py4web from source:
>>>
>>> git clone https://github.com/web2py/py4web.gitcd py4web
>>> python3 -m pip install -r 

[web2py] Re: web3py -> py4web

2019-08-31 Thread Val K
Yeah, I had the same issue, because there is no apps/__init__.py in the repo - 
just create 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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/eab555d0-b628-41e6-8a22-b23e48648684%40googlegroups.com.


[web2py] Re: web3py -> py4web

2019-08-31 Thread pollwerk
Using: 
python3 -m pip install py4web --upgrade  worked. 

But i was unsucessful with these two commands:
source bin/activate 
   ./py4web-start apps / 

Then I used: 

git clone https://github.com/web2py/py4web.git
cd py4web
python3 -m pip install -r requirements.txt
python3 setup.py install


and finelly: 

py4web-start apps


It came up but I was unsucessful when entering the requested one-time dashboard 
password.


KlMcM:py4web klausxx$ py4web-start apps


██╗ ██╗   ██╗██╗  ██╗██╗██╗███╗██╗ 

██╔══██╗╚██╗ ██╔╝██║  ██║██║██║██╔╝██╔══██╗

██╔╝ ╚╔╝ ███║██║ █╗ ██║█╗  ██╔╝

██╔═══╝   ╚██╔╝  ╚██║██║███╗██║██╔══╝  ██╔══██╗

██║██║██║╚███╔███╔╝███╗██╔╝

╚═╝╚═╝╚═╝ ╚══╝╚══╝ ╚══╝╚═╝ 

It is still experimental...


assets-folder: 
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/assets

Choose a one-time dashboad password: ONETIMEPW

Dashboard is at: http://127.0.0.1:8000/_dashboard

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/py4web-start", 
line 11, in 

load_entry_point('py4web==0.1.20190826.1', 'console_scripts', 
'py4web-start')()

  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/core.py",
 line 816, in main

Reloader.import_apps()

  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py4web/core.py",
 line 661, in import_apps

'apps', path).load_module()

  File "", line 407, in 
_check_name_wrapper

  File "", line 907, in load_module

  File "", line 732, in load_module

  File "", line 265, in _load_module_shim

  File "", line 696, in _load

  File "", line 677, in _load_unlocked

  File "", line 724, in exec_module

  File "", line 859, in get_code

  File "", line 916, in get_data

FileNotFoundError: [Errno 2] No such file or directory: 
'/Users/klausv.zinser/py4web/apps/__init__.py'

KlMcM:py4web klausxx$ 


Klaus


Am Montag, 26. August 2019 19:05:24 UTC+2 schrieb En Ware:
>
> hmm , I just tried from pip and works find 
>
> python3 -m pip install py4web --upgrade 
>
> source bin/activate 
>
> ./py4web-start apps / 
>
>
> ██╗ ██╗   ██╗██╗  ██╗██╗██╗███╗██╗ 
> ██╔══██╗╚██╗ ██╔╝██║  ██║██║██║██╔╝██╔══██╗
> ██╔╝ ╚╔╝ ███║██║ █╗ ██║█╗  ██╔╝
> ██╔═══╝   ╚██╔╝  ╚██║██║███╗██║██╔══╝  ██╔══██╗
> ██║██║██║╚███╔███╔╝███╗██╔╝
> ╚═╝╚═╝╚═╝ ╚══╝╚══╝ ╚══╝╚═╝ 
> It is still experimental...
>
> assets-folder: 
> /Users/.env/python/py4web/lib/python3.6/site-packages/py4web/assets
> Choose a one-time dashboad password: 
> Dashboard is at: http://127.0.0.1:8000/_dashboard
> [X] loaded _dashboard 
> [X] loaded myapp 
> [X] loaded _default 
> [X] loaded _scaffold 
> Bottle v0.12.17 server starting up (using TornadoServer())...
> Listening on http://127.0.0.1:8000/
> Hit Ctrl-C to quit.
>
>
>
> On Wednesday, August 21, 2019 at 10:51:31 AM UTC-5, Annet wrote:
>>
>>
>> python3 setup.py install
>>>
>>
>> I installed py4web from source:
>>
>> git clone https://github.com/web2py/py4web.gitcd py4web
>> python3 -m pip install -r requirements.txt
>> python3 setup.py install
>>
>>
>> Running the last statement gives the following errors:
>>
>> byte-compiling 
>> build/bdist.macosx-10.9-x86_64/egg/py4web/utils/auth_plugins/saml2_plugin.py 
>> to saml2_plugin.cpython-37.pyc
>>   File 
>> "build/bdist.macosx-10.9-x86_64/egg/py4web/utils/auth_plugins/saml2_plugin.py",
>>  
>> line 105
>> session.saml_outstanding_queries = {req_id: request.url}
>>^
>> SyntaxError: invalid syntax
>>
>> and
>>
>> Extracting py4web-0.1.20190818.2-py3.7.egg to 
>> /usr/local/lib/python3.7/site-packages
>>   File 
>> "/usr/local/lib/python3.7/site-packages/py4web-0.1.20190818.2-py3.7.egg/py4web/utils/auth_plugins/saml2_plugin.py",
>>  
>> line 105
>> session.saml_outstanding_queries = {req_id: request.url}
>>^
>> SyntaxError: invalid syntax
>>
>>
>>
>> I starting py4web 
>>
>> py4web-start apps
>>
>>
>> fails with the following error:
>>
>> FileNotFoundError: [Errno 2] No such file or directory: 
>> '/Users/me/py4web/apps/__init__.py'
>>
>>
>> How do I resolve these issues?
>>
>>
>> Kind regards,
>>
>> Annet
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/6fb376ca-9ab2-46e5-a19a-d9ef5847628b%40googlegroups.com.


[web2py] Re: web3py -> py4web

2019-08-26 Thread En Ware
hmm , I just tried from pip and works find 

python3 -m pip install py4web --upgrade 

source bin/activate 

./py4web-start apps / 


██╗ ██╗   ██╗██╗  ██╗██╗██╗███╗██╗ 
██╔══██╗╚██╗ ██╔╝██║  ██║██║██║██╔╝██╔══██╗
██╔╝ ╚╔╝ ███║██║ █╗ ██║█╗  ██╔╝
██╔═══╝   ╚██╔╝  ╚██║██║███╗██║██╔══╝  ██╔══██╗
██║██║██║╚███╔███╔╝███╗██╔╝
╚═╝╚═╝╚═╝ ╚══╝╚══╝ ╚══╝╚═╝ 
It is still experimental...

assets-folder: 
/Users/.env/python/py4web/lib/python3.6/site-packages/py4web/assets
Choose a one-time dashboad password: 
Dashboard is at: http://127.0.0.1:8000/_dashboard
[X] loaded _dashboard 
[X] loaded myapp 
[X] loaded _default 
[X] loaded _scaffold 
Bottle v0.12.17 server starting up (using TornadoServer())...
Listening on http://127.0.0.1:8000/
Hit Ctrl-C to quit.



On Wednesday, August 21, 2019 at 10:51:31 AM UTC-5, Annet wrote:
>
>
> python3 setup.py install
>>
>
> I installed py4web from source:
>
> git clone https://github.com/web2py/py4web.gitcd py4web
> python3 -m pip install -r requirements.txt
> python3 setup.py install
>
>
> Running the last statement gives the following errors:
>
> byte-compiling 
> build/bdist.macosx-10.9-x86_64/egg/py4web/utils/auth_plugins/saml2_plugin.py 
> to saml2_plugin.cpython-37.pyc
>   File 
> "build/bdist.macosx-10.9-x86_64/egg/py4web/utils/auth_plugins/saml2_plugin.py",
>  
> line 105
> session.saml_outstanding_queries = {req_id: request.url}
>^
> SyntaxError: invalid syntax
>
> and
>
> Extracting py4web-0.1.20190818.2-py3.7.egg to 
> /usr/local/lib/python3.7/site-packages
>   File 
> "/usr/local/lib/python3.7/site-packages/py4web-0.1.20190818.2-py3.7.egg/py4web/utils/auth_plugins/saml2_plugin.py",
>  
> line 105
> session.saml_outstanding_queries = {req_id: request.url}
>^
> SyntaxError: invalid syntax
>
>
>
> I starting py4web 
>
> py4web-start apps
>
>
> fails with the following error:
>
> FileNotFoundError: [Errno 2] No such file or directory: 
> '/Users/me/py4web/apps/__init__.py'
>
>
> How do I resolve these issues?
>
>
> Kind regards,
>
> Annet
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/91e5cf0f-77f6-4ff7-bef7-c9c510609997%40googlegroups.com.


[web2py] Re: web3py -> py4web

2019-08-21 Thread 'Annet' via web2py-users


> python3 setup.py install
>

I installed py4web from source:

git clone https://github.com/web2py/py4web.gitcd py4web
python3 -m pip install -r requirements.txt
python3 setup.py install


Running the last statement gives the following errors:

byte-compiling 
build/bdist.macosx-10.9-x86_64/egg/py4web/utils/auth_plugins/saml2_plugin.py 
to saml2_plugin.cpython-37.pyc
  File 
"build/bdist.macosx-10.9-x86_64/egg/py4web/utils/auth_plugins/saml2_plugin.py", 
line 105
session.saml_outstanding_queries = {req_id: request.url}
   ^
SyntaxError: invalid syntax

and

Extracting py4web-0.1.20190818.2-py3.7.egg to 
/usr/local/lib/python3.7/site-packages
  File 
"/usr/local/lib/python3.7/site-packages/py4web-0.1.20190818.2-py3.7.egg/py4web/utils/auth_plugins/saml2_plugin.py",
 
line 105
session.saml_outstanding_queries = {req_id: request.url}
   ^
SyntaxError: invalid syntax



I starting py4web 

py4web-start apps


fails with the following error:

FileNotFoundError: [Errno 2] No such file or directory: 
'/Users/me/py4web/apps/__init__.py'


How do I resolve these issues?


Kind regards,

Annet

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/aadf48f0-de1d-4c88-ad1c-aaabdf76d1b9%40googlegroups.com.


[web2py] Re: web3py -> py4web

2019-08-15 Thread VP
py4web is a great name.

Just on the first page of documentation, but I like what I am reading a 
lot. 



On Wednesday, July 24, 2019 at 12:40:27 AM UTC-5, Massimo Di Pierro wrote:
>
> OK. I know. I am not good with names. 
> But there are lots of requirements to be fulfilled.
> py4web.com was available and the pypi package was available.
> Here is running on google cloud:
> http://py4web.com/
>
> Ducking...
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8c613e12-1757-4434-9c18-ed98bb3f42c6%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-08-12 Thread Massimo Di Pierro
Not yet. Will create one eventually but want to finish a couple of features 
with support with this community

On Monday, 12 August 2019 07:38:46 UTC-7, En Ware wrote:
>
> Is there an IRC channel for py4web yet ? or an official group ? 
>
> On Tuesday, July 30, 2019 at 1:38:05 AM UTC-5, Massimo Di Pierro wrote:
>>
>> to be clear... most of the docs is backported by web2py + explanation of 
>> sessions and @action decorator.
>> Most of the new features are still undocumented or poorly documented 
>> unfortunately. Namely pydal.restapi, auth plugins, Form,  and 
>> 
>> Will try my best in the next few days.
>>
>> On Monday, 29 July 2019 02:36:40 UTC-7, Jose C wrote:
>>>
>>> Darn, I hunted around but didn't see it.  Thanks for the link...
>>>
>>>
>>>
>>> On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote:

 Hi Jose,

 the documentation is already on GitHub 
 
  , 
 and PR are always welcome ;-)

 Nico

 Il giorno lun 29 lug 2019 alle ore 10:14 Jose C  
 ha scritto:

> Looks promising... some questions:
>
> 1) Have spotted many typos in docs but can't find docs for py4web on 
> github.  If docs are on there, like web2py book, people can submit pull 
> requests and help massage the docs into shape.
> 2) Should there be a new official group created for py4web (or some 
> other repo of Q knowledge, StackExchange?)   A) to minimize noise in 
> the 
> web2py group and B) also make it easier to find py4web related stuff?  
> 3) When are you aiming for the first "stable" release?  
>
> Rgds,
>
>
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send 
> an email to web...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
>  
> 
> .
>


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/587bfd5f-9387-4552-ab6d-2c008ffd417d%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-08-12 Thread En Ware
Is there an IRC channel for py4web yet ? or an official group ? 

On Tuesday, July 30, 2019 at 1:38:05 AM UTC-5, Massimo Di Pierro wrote:
>
> to be clear... most of the docs is backported by web2py + explanation of 
> sessions and @action decorator.
> Most of the new features are still undocumented or poorly documented 
> unfortunately. Namely pydal.restapi, auth plugins, Form,  and 
> 
> Will try my best in the next few days.
>
> On Monday, 29 July 2019 02:36:40 UTC-7, Jose C wrote:
>>
>> Darn, I hunted around but didn't see it.  Thanks for the link...
>>
>>
>>
>> On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote:
>>>
>>> Hi Jose,
>>>
>>> the documentation is already on GitHub 
>>> 
>>>  , 
>>> and PR are always welcome ;-)
>>>
>>> Nico
>>>
>>> Il giorno lun 29 lug 2019 alle ore 10:14 Jose C  
>>> ha scritto:
>>>
 Looks promising... some questions:

 1) Have spotted many typos in docs but can't find docs for py4web on 
 github.  If docs are on there, like web2py book, people can submit pull 
 requests and help massage the docs into shape.
 2) Should there be a new official group created for py4web (or some 
 other repo of Q knowledge, StackExchange?)   A) to minimize noise in the 
 web2py group and B) also make it easier to find py4web related stuff?  
 3) When are you aiming for the first "stable" release?  

 Rgds,


 -- 
 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 unsubscribe from this group and stop receiving emails from it, send 
 an email to web...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
  
 
 .

>>>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b7a007b1-f12a-440a-915b-455515883a21%40googlegroups.com.


[web2py] Re: web3py -> py4web

2019-07-30 Thread Massimo Di Pierro
you have to run 

python3 setup.py install



On Tuesday, 30 July 2019 10:59:36 UTC-7, En Ware wrote:
>
> when using py4web source , py4web-start is missing. from pip py4web-start 
> exists. 
>
>
> On Wednesday, July 24, 2019 at 12:40:27 AM UTC-5, Massimo Di Pierro wrote:
>>
>> OK. I know. I am not good with names. 
>> But there are lots of requirements to be fulfilled.
>> py4web.com was available and the pypi package was available.
>> Here is running on google cloud:
>> http://py4web.com/
>>
>> Ducking...
>>
>>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/befe4689-51d1-495f-b611-ddb9e84ca164%40googlegroups.com.


[web2py] Re: web3py -> py4web

2019-07-30 Thread En Ware
in the documentation for 
http://py4web.com/_documentation/static/index.html#chapter-02. 
datetime.datime.now() (should that be datetime.datetime.now() ? 

On Tuesday, July 30, 2019 at 12:59:36 PM UTC-5, En Ware wrote:
>
> when using py4web source , py4web-start is missing. from pip py4web-start 
> exists. 
>
>
> On Wednesday, July 24, 2019 at 12:40:27 AM UTC-5, Massimo Di Pierro wrote:
>>
>> OK. I know. I am not good with names. 
>> But there are lots of requirements to be fulfilled.
>> py4web.com was available and the pypi package was available.
>> Here is running on google cloud:
>> http://py4web.com/
>>
>> Ducking...
>>
>>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0a5d4744-d922-4629-a479-234a31b5700d%40googlegroups.com.


[web2py] Re: web3py -> py4web

2019-07-30 Thread En Ware
when using py4web source , py4web-start is missing. from pip py4web-start 
exists. 


On Wednesday, July 24, 2019 at 12:40:27 AM UTC-5, Massimo Di Pierro wrote:
>
> OK. I know. I am not good with names. 
> But there are lots of requirements to be fulfilled.
> py4web.com was available and the pypi package was available.
> Here is running on google cloud:
> http://py4web.com/
>
> Ducking...
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/c7543229-fd9d-4afb-a4cd-a82a104eefc2%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-30 Thread villas
On Tuesday, 30 July 2019 07:35:08 UTC+1, Massimo Di Pierro wrote:
>
> I did not know about this. It has a cost. I'd rather not pay for it.
>

1. Just so you know, from GitBook Pricing  
page: 

> GitBook is free for open-source & non-profit teams 
>

2. Markdown instead of Markmin +1

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/66294a20-ba3c-4451-a978-2aba062914b6%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-30 Thread Massimo Di Pierro
to be clear... most of the docs is backported by web2py + explanation of 
sessions and @action decorator.
Most of the new features are still undocumented or poorly documented 
unfortunately. Namely pydal.restapi, auth plugins, Form,  and 

Will try my best in the next few days.

On Monday, 29 July 2019 02:36:40 UTC-7, Jose C wrote:
>
> Darn, I hunted around but didn't see it.  Thanks for the link...
>
>
>
> On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote:
>>
>> Hi Jose,
>>
>> the documentation is already on GitHub 
>> 
>>  , 
>> and PR are always welcome ;-)
>>
>> Nico
>>
>> Il giorno lun 29 lug 2019 alle ore 10:14 Jose C  
>> ha scritto:
>>
>>> Looks promising... some questions:
>>>
>>> 1) Have spotted many typos in docs but can't find docs for py4web on 
>>> github.  If docs are on there, like web2py book, people can submit pull 
>>> requests and help massage the docs into shape.
>>> 2) Should there be a new official group created for py4web (or some 
>>> other repo of Q knowledge, StackExchange?)   A) to minimize noise in the 
>>> web2py group and B) also make it easier to find py4web related stuff?  
>>> 3) When are you aiming for the first "stable" release?  
>>>
>>> Rgds,
>>>
>>>
>>> -- 
>>> 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 unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/eb571255-436d-4f2c-9a8f-d39fcb095276%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-30 Thread Massimo Di Pierro
*from pydal.restapi import RestAPI, Policy*

On Monday, 29 July 2019 14:13:50 UTC-7, Tito Garrido wrote:
>
> I am trying to reproduce the RestAPI example:
>
>
>
> *>>> print (pydal.__version__)19.05.11>>> from pydal.dbapi import RestAPI, 
> Policy*
> Traceback (most recent call last):
>   File "", line 1, in 
> ModuleNotFoundError: No module named 'pydal.dbapi'
>
> What am I missing?
>
>
> On Mon, Jul 29, 2019 at 10:43 AM António Ramos  
> wrote:
>
>> Why not using gitbook to create the documentation ???
>> repos already using gitbook...
>>
>> https://guide.elm-lang.org/  
>> https://docs.feathersjs.com/#  
>>
>> etc
>>
>> Em seg, 29 de jul de 2019 às 10:36, Jose C  
>> escreveu:
>>
>>> Darn, I hunted around but didn't see it.  Thanks for the link...
>>>
>>>
>>>
>>> On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote:

 Hi Jose,

 the documentation is already on GitHub 
 
  , 
 and PR are always welcome ;-)

 Nico

 Il giorno lun 29 lug 2019 alle ore 10:14 Jose C  
 ha scritto:

> Looks promising... some questions:
>
> 1) Have spotted many typos in docs but can't find docs for py4web on 
> github.  If docs are on there, like web2py book, people can submit pull 
> requests and help massage the docs into shape.
> 2) Should there be a new official group created for py4web (or some 
> other repo of Q knowledge, StackExchange?)   A) to minimize noise in 
> the 
> web2py group and B) also make it easier to find py4web related stuff?  
> 3) When are you aiming for the first "stable" release?  
>
> Rgds,
>
>
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send 
> an email to web...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
>  
> 
> .
>
 -- 
>>> 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 unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/web2py/05415021-9b4a-41bb-ab6e-2c9c3648dad0%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>> -- 
>> 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 unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/CAEM0BxMNf%2BDKcKqU-GsdT7JZX%3DEWoKzT7aPQBieGiDb3dhd5Yg%40mail.gmail.com
>>  
>> 
>> .
>>
>
>
> -- 
>
> Linux User #387870
> .
>  _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:___
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/3acf9f67-2921-41d2-893c-a10c38de351f%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-30 Thread Massimo Di Pierro
I did not know about this. It has a cost. I'd rather not pay for it.
But I am thinking that perhaps we should move away from markmin and use 
markdown. Markmin is better but if we follow a more established standard we 
can use more tools. Also the book chapters can be used as README.md for the 
components.

On Monday, 29 July 2019 06:43:13 UTC-7, Ramos wrote:
>
> Why not using gitbook to create the documentation ???
> repos already using gitbook...
>
> https://guide.elm-lang.org/  
> https://docs.feathersjs.com/#  
>
> etc
>
> Em seg, 29 de jul de 2019 às 10:36, Jose C  
> escreveu:
>
>> Darn, I hunted around but didn't see it.  Thanks for the link...
>>
>>
>>
>> On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote:
>>>
>>> Hi Jose,
>>>
>>> the documentation is already on GitHub 
>>> 
>>>  , 
>>> and PR are always welcome ;-)
>>>
>>> Nico
>>>
>>> Il giorno lun 29 lug 2019 alle ore 10:14 Jose C  
>>> ha scritto:
>>>
 Looks promising... some questions:

 1) Have spotted many typos in docs but can't find docs for py4web on 
 github.  If docs are on there, like web2py book, people can submit pull 
 requests and help massage the docs into shape.
 2) Should there be a new official group created for py4web (or some 
 other repo of Q knowledge, StackExchange?)   A) to minimize noise in the 
 web2py group and B) also make it easier to find py4web related stuff?  
 3) When are you aiming for the first "stable" release?  

 Rgds,


 -- 
 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 unsubscribe from this group and stop receiving emails from it, send 
 an email to web...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
  
 
 .

>>> -- 
>> 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 unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/05415021-9b4a-41bb-ab6e-2c9c3648dad0%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b1a5b93d-b1f0-4610-b9ce-f035efd24136%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-29 Thread Tito Garrido
I am trying to reproduce the RestAPI example:



*>>> print (pydal.__version__)19.05.11>>> from pydal.dbapi import RestAPI,
Policy*
Traceback (most recent call last):
  File "", line 1, in 
ModuleNotFoundError: No module named 'pydal.dbapi'

What am I missing?


On Mon, Jul 29, 2019 at 10:43 AM António Ramos  wrote:

> Why not using gitbook to create the documentation ???
> repos already using gitbook...
>
> https://guide.elm-lang.org/
> https://docs.feathersjs.com/#
>
> etc
>
> Em seg, 29 de jul de 2019 às 10:36, Jose C 
> escreveu:
>
>> Darn, I hunted around but didn't see it.  Thanks for the link...
>>
>>
>>
>> On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote:
>>>
>>> Hi Jose,
>>>
>>> the documentation is already on GitHub
>>> 
>>>  ,
>>> and PR are always welcome ;-)
>>>
>>> Nico
>>>
>>> Il giorno lun 29 lug 2019 alle ore 10:14 Jose C 
>>> ha scritto:
>>>
 Looks promising... some questions:

 1) Have spotted many typos in docs but can't find docs for py4web on
 github.  If docs are on there, like web2py book, people can submit pull
 requests and help massage the docs into shape.
 2) Should there be a new official group created for py4web (or some
 other repo of Q knowledge, StackExchange?)   A) to minimize noise in the
 web2py group and B) also make it easier to find py4web related stuff?
 3) When are you aiming for the first "stable" release?

 Rgds,


 --
 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 unsubscribe from this group and stop receiving emails from it, send
 an email to web...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
 
 .

>>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/05415021-9b4a-41bb-ab6e-2c9c3648dad0%40googlegroups.com
>> 
>> .
>>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/CAEM0BxMNf%2BDKcKqU-GsdT7JZX%3DEWoKzT7aPQBieGiDb3dhd5Yg%40mail.gmail.com
> 
> .
>


-- 

Linux User #387870
.
 _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:___

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAL67CHH%2BXnje7hmQ4Pt0HX%3DH%2BmczFcitZC3A9rzAs5K-b4rUsw%40mail.gmail.com.


Re: [web2py] Re: web3py -> py4web

2019-07-29 Thread António Ramos
Why not using gitbook to create the documentation ???
repos already using gitbook...

https://guide.elm-lang.org/
https://docs.feathersjs.com/#

etc

Em seg, 29 de jul de 2019 às 10:36, Jose C 
escreveu:

> Darn, I hunted around but didn't see it.  Thanks for the link...
>
>
>
> On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote:
>>
>> Hi Jose,
>>
>> the documentation is already on GitHub
>> 
>>  ,
>> and PR are always welcome ;-)
>>
>> Nico
>>
>> Il giorno lun 29 lug 2019 alle ore 10:14 Jose C 
>> ha scritto:
>>
>>> Looks promising... some questions:
>>>
>>> 1) Have spotted many typos in docs but can't find docs for py4web on
>>> github.  If docs are on there, like web2py book, people can submit pull
>>> requests and help massage the docs into shape.
>>> 2) Should there be a new official group created for py4web (or some
>>> other repo of Q knowledge, StackExchange?)   A) to minimize noise in the
>>> web2py group and B) also make it easier to find py4web related stuff?
>>> 3) When are you aiming for the first "stable" release?
>>>
>>> Rgds,
>>>
>>>
>>> --
>>> 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 unsubscribe from this group and stop receiving emails from it, send
>>> an email to web...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/05415021-9b4a-41bb-ab6e-2c9c3648dad0%40googlegroups.com
> 
> .
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAEM0BxMNf%2BDKcKqU-GsdT7JZX%3DEWoKzT7aPQBieGiDb3dhd5Yg%40mail.gmail.com.


Re: [web2py] Re: web3py -> py4web

2019-07-29 Thread Jose C
Darn, I hunted around but didn't see it.  Thanks for the link...



On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote:
>
> Hi Jose,
>
> the documentation is already on GitHub 
> 
>  , 
> and PR are always welcome ;-)
>
> Nico
>
> Il giorno lun 29 lug 2019 alle ore 10:14 Jose C  > ha scritto:
>
>> Looks promising... some questions:
>>
>> 1) Have spotted many typos in docs but can't find docs for py4web on 
>> github.  If docs are on there, like web2py book, people can submit pull 
>> requests and help massage the docs into shape.
>> 2) Should there be a new official group created for py4web (or some other 
>> repo of Q knowledge, StackExchange?)   A) to minimize noise in the web2py 
>> group and B) also make it easier to find py4web related stuff?  
>> 3) When are you aiming for the first "stable" release?  
>>
>> Rgds,
>>
>>
>> -- 
>> 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 unsubscribe from this group and stop receiving emails from it, send an 
>> email to web...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/05415021-9b4a-41bb-ab6e-2c9c3648dad0%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-29 Thread Nico Zanferrari
Hi Jose,

the documentation is already on GitHub

,
and PR are always welcome ;-)

Nico

Il giorno lun 29 lug 2019 alle ore 10:14 Jose C 
ha scritto:

> Looks promising... some questions:
>
> 1) Have spotted many typos in docs but can't find docs for py4web on
> github.  If docs are on there, like web2py book, people can submit pull
> requests and help massage the docs into shape.
> 2) Should there be a new official group created for py4web (or some other
> repo of Q knowledge, StackExchange?)   A) to minimize noise in the web2py
> group and B) also make it easier to find py4web related stuff?
> 3) When are you aiming for the first "stable" release?
>
> Rgds,
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com
> 
> .
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAE8D_Agv2W1PskLrNCwtWqCs1mYbtESU%2BN2yz8HHguvSNNwhg%40mail.gmail.com.


[web2py] Re: web3py -> py4web

2019-07-29 Thread Jose C
Looks promising... some questions:

1) Have spotted many typos in docs but can't find docs for py4web on 
github.  If docs are on there, like web2py book, people can submit pull 
requests and help massage the docs into shape.
2) Should there be a new official group created for py4web (or some other 
repo of Q knowledge, StackExchange?)   A) to minimize noise in the web2py 
group and B) also make it easier to find py4web related stuff?  
3) When are you aiming for the first "stable" release?  

Rgds,


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0693c615-1283-413e-b976-91c238da8384%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread António Ramos
http://py4web.com/_documentation/static/index.html#chapter-06

Em qua, 24 de jul de 2019 às 12:28, Kevin Keller 
escreveu:

> Which file Antonio?
>
> I found what seems an Oauth2 server py and pyjwt in core.
>
> So I suppose OAuth2 + OpenID Restful API can be done with web4py already..
> just need to find in the docs..
>
> By the way.. happy to contribute to the docs.
>
>
>
> On Wed, Jul 24, 2019 at 1:21 PM António Ramos 
> wrote:
>
>>
>> Found a typo RestPI instead of RestAPI
>>
>> Regardsdef api():
>> return RestPI(db, policy)(request.method, request.args(0), 
>> request.args(1),
>>  request.get_vars, request.post_vars)
>>
>>
>> Em qua, 24 de jul de 2019 às 12:17, António Ramos 
>> escreveu:
>>
>>> - Great documentation layout
>>> - A litle bette name (Py4Web)
>>> - But the dashboard and the running circle and colours chosen are
>>> completely out of order in my opinion if it matters. Where is the logo ?
>>> will it have a logo ? what colour scheme will it use ?
>>>
>>> Regards
>>>
>>> Em qua, 24 de jul de 2019 às 09:44, Kevin Keller 
>>> escreveu:
>>>
 Would live to try it today.

 Is there documentation how I can enable to require auth and use JWT for
 the PyDal REST API?

 On Wednesday, 24 July 2019 07:40:27 UTC+2, Massimo Di Pierro wrote:
>
> OK. I know. I am not good with names.
> But there are lots of requirements to be fulfilled.
> py4web.com was available and the pypi package was available.
> Here is running on google cloud:
> http://py4web.com/
>
> Ducking...
>
> --
 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 unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/web2py/f481ba65-8026-46a9-a230-77e8edda9e37%40googlegroups.com
 
 .

>>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/CAEM0BxNz%2BhEcVhzgTeVU3s-1-z1MgsunXv%2Bgm1sonjdmFEBcQA%40mail.gmail.com
>> 
>> .
>>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/CADHCKLRXX4Mh%2B%3DxsM-30pBDiH5emECwFx8zBxxdDGX_i%3DZegmA%40mail.gmail.com
> 
> .
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAEM0BxNSJ4ZO-NNc6j5HJDJOUFpX%2BAh6By-nFpFgSbYdGkU5Ew%40mail.gmail.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread Kevin Keller
Which file Antonio?

I found what seems an Oauth2 server py and pyjwt in core.

So I suppose OAuth2 + OpenID Restful API can be done with web4py already..
just need to find in the docs..

By the way.. happy to contribute to the docs.



On Wed, Jul 24, 2019 at 1:21 PM António Ramos  wrote:

>
> Found a typo RestPI instead of RestAPI
>
> Regardsdef api():
> return RestPI(db, policy)(request.method, request.args(0), 
> request.args(1),
>  request.get_vars, request.post_vars)
>
>
> Em qua, 24 de jul de 2019 às 12:17, António Ramos 
> escreveu:
>
>> - Great documentation layout
>> - A litle bette name (Py4Web)
>> - But the dashboard and the running circle and colours chosen are
>> completely out of order in my opinion if it matters. Where is the logo ?
>> will it have a logo ? what colour scheme will it use ?
>>
>> Regards
>>
>> Em qua, 24 de jul de 2019 às 09:44, Kevin Keller 
>> escreveu:
>>
>>> Would live to try it today.
>>>
>>> Is there documentation how I can enable to require auth and use JWT for
>>> the PyDal REST API?
>>>
>>> On Wednesday, 24 July 2019 07:40:27 UTC+2, Massimo Di Pierro wrote:

 OK. I know. I am not good with names.
 But there are lots of requirements to be fulfilled.
 py4web.com was available and the pypi package was available.
 Here is running on google cloud:
 http://py4web.com/

 Ducking...

 --
>>> 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 unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/f481ba65-8026-46a9-a230-77e8edda9e37%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/CAEM0BxNz%2BhEcVhzgTeVU3s-1-z1MgsunXv%2Bgm1sonjdmFEBcQA%40mail.gmail.com
> 
> .
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CADHCKLRXX4Mh%2B%3DxsM-30pBDiH5emECwFx8zBxxdDGX_i%3DZegmA%40mail.gmail.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread António Ramos
Found a typo RestPI instead of RestAPI

Regardsdef api():
return RestPI(db, policy)(request.method, request.args(0), request.args(1),
 request.get_vars, request.post_vars)


Em qua, 24 de jul de 2019 às 12:17, António Ramos 
escreveu:

> - Great documentation layout
> - A litle bette name (Py4Web)
> - But the dashboard and the running circle and colours chosen are
> completely out of order in my opinion if it matters. Where is the logo ?
> will it have a logo ? what colour scheme will it use ?
>
> Regards
>
> Em qua, 24 de jul de 2019 às 09:44, Kevin Keller 
> escreveu:
>
>> Would live to try it today.
>>
>> Is there documentation how I can enable to require auth and use JWT for
>> the PyDal REST API?
>>
>> On Wednesday, 24 July 2019 07:40:27 UTC+2, Massimo Di Pierro wrote:
>>>
>>> OK. I know. I am not good with names.
>>> But there are lots of requirements to be fulfilled.
>>> py4web.com was available and the pypi package was available.
>>> Here is running on google cloud:
>>> http://py4web.com/
>>>
>>> Ducking...
>>>
>>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/f481ba65-8026-46a9-a230-77e8edda9e37%40googlegroups.com
>> 
>> .
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAEM0BxNz%2BhEcVhzgTeVU3s-1-z1MgsunXv%2Bgm1sonjdmFEBcQA%40mail.gmail.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread António Ramos
- Great documentation layout
- A litle bette name (Py4Web)
- But the dashboard and the running circle and colours chosen are
completely out of order in my opinion if it matters. Where is the logo ?
will it have a logo ? what colour scheme will it use ?

Regards

Em qua, 24 de jul de 2019 às 09:44, Kevin Keller 
escreveu:

> Would live to try it today.
>
> Is there documentation how I can enable to require auth and use JWT for
> the PyDal REST API?
>
> On Wednesday, 24 July 2019 07:40:27 UTC+2, Massimo Di Pierro wrote:
>>
>> OK. I know. I am not good with names.
>> But there are lots of requirements to be fulfilled.
>> py4web.com was available and the pypi package was available.
>> Here is running on google cloud:
>> http://py4web.com/
>>
>> Ducking...
>>
>> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/f481ba65-8026-46a9-a230-77e8edda9e37%40googlegroups.com
> 
> .
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAEM0BxOGjB4y03pO_5sKasjKX4tOAPQx9gnLyEKBQAC3taKGew%40mail.gmail.com.


[web2py] Re: web3py -> py4web

2019-07-24 Thread Kevin Keller
Would live to try it today. 

Is there documentation how I can enable to require auth and use JWT for the 
PyDal REST API?

On Wednesday, 24 July 2019 07:40:27 UTC+2, Massimo Di Pierro wrote:
>
> OK. I know. I am not good with names. 
> But there are lots of requirements to be fulfilled.
> py4web.com was available and the pypi package was available.
> Here is running on google cloud:
> http://py4web.com/
>
> Ducking...
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f481ba65-8026-46a9-a230-77e8edda9e37%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread Nico Zanferrari
Pretty awesome ;-)

By the way, the box where you write the password should be enlarged a
little on the right...

[image: image.png]

Il giorno mer 24 lug 2019 alle ore 10:09 Massimo Di Pierro <
massimo.dipie...@gmail.com> ha scritto:

> Dashboard now partially works on GAE in demo mode.
> http://py4web.com/_dashboard
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/41fb7ab5-546f-4332-b316-ef960255eb02%40googlegroups.com
> 
> .
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAE8D_A_biRZOS5PdOC%3D_xkxDC2sWLwRD-3-3VNJfswDtjGenw%40mail.gmail.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread Massimo Di Pierro
Dashboard now partially works on GAE in demo mode. 
http://py4web.com/_dashboard

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/41fb7ab5-546f-4332-b316-ef960255eb02%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread Nico Zanferrari
Excellent!


Il giorno mer 24 lug 2019 alle ore 08:17 Massimo Di Pierro <
massimo.dipie...@gmail.com> ha scritto:

>
> Notice the time to serve this page (
> https://github.com/web2py/py4web/blob/master/apps/_default/templates/index.html)
> which is a template, is ~7ms. In web2py it was 100-200ms.
>
>
>
> On Tuesday, 23 July 2019 23:03:08 UTC-7, sandeep patel wrote:
>>
>> Absolutely Great!!
>>
>> But
>> http://py4web.com/_documentation/static/  though 404
>>
>>
>>
>> On Wed, Jul 24, 2019 at 11:28 AM Dave S  wrote:
>>
>>>
>>>
>>> On Tuesday, July 23, 2019 at 10:40:27 PM UTC-7, Massimo Di Pierro wrote:

 OK. I know. I am not good with names.
 But there are lots of requirements to be fulfilled.
 py4web.com was available and the pypi package was available.
 Here is running on google cloud:
 http://py4web.com/

 Ducking...


>>> Thumbs up!
>>>
>>> (But _dashboard was 404)
>>>
>>> /dps
>>>
>>>
>>> --
>>> 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 unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/b8951d9f-f7d3-49ed-9c95-5f85b71657b3%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/3ecf82dc-fa2c-423b-b96a-815342eab58a%40googlegroups.com
> 
> .
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAE8D_BwoycvcyfRn4PWwSpNVpFSm-Y5uCjehmvagyr6WfPoJA%40mail.gmail.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread Massimo Di Pierro

Notice the time to serve this page 
(https://github.com/web2py/py4web/blob/master/apps/_default/templates/index.html)
 
which is a template, is ~7ms. In web2py it was 100-200ms.



On Tuesday, 23 July 2019 23:03:08 UTC-7, sandeep patel wrote:
>
> Absolutely Great!!
>
> But
> http://py4web.com/_documentation/static/  though 404 
>
>
>
> On Wed, Jul 24, 2019 at 11:28 AM Dave S  wrote:
>
>>
>>
>> On Tuesday, July 23, 2019 at 10:40:27 PM UTC-7, Massimo Di Pierro wrote:
>>>
>>> OK. I know. I am not good with names. 
>>> But there are lots of requirements to be fulfilled.
>>> py4web.com was available and the pypi package was available.
>>> Here is running on google cloud:
>>> http://py4web.com/
>>>
>>> Ducking...
>>>
>>>
>> Thumbs up!
>>
>> (But _dashboard was 404)
>>
>> /dps
>>  
>>
>> -- 
>> 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 unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/b8951d9f-f7d3-49ed-9c95-5f85b71657b3%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/3ecf82dc-fa2c-423b-b96a-815342eab58a%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread Massimo Di Pierro
The dashboard does not work on GAE

http://py4web.com/_documentation/static/ is not a valid URL 
http://py4web.com/_documention  is

On Tuesday, 23 July 2019 23:03:08 UTC-7, sandeep patel wrote:
>
> Absolutely Great!!
>
> But
> http://py4web.com/_documentation/static/  though 404 
>
>
>
> On Wed, Jul 24, 2019 at 11:28 AM Dave S  wrote:
>
>>
>>
>> On Tuesday, July 23, 2019 at 10:40:27 PM UTC-7, Massimo Di Pierro wrote:
>>>
>>> OK. I know. I am not good with names. 
>>> But there are lots of requirements to be fulfilled.
>>> py4web.com was available and the pypi package was available.
>>> Here is running on google cloud:
>>> http://py4web.com/
>>>
>>> Ducking...
>>>
>>>
>> Thumbs up!
>>
>> (But _dashboard was 404)
>>
>> /dps
>>  
>>
>> -- 
>> 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 unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/b8951d9f-f7d3-49ed-9c95-5f85b71657b3%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b757e019-50fd-4589-ae19-b105af9de281%40googlegroups.com.


Re: [web2py] Re: web3py -> py4web

2019-07-24 Thread sandeep patel
Absolutely Great!!

But
http://py4web.com/_documentation/static/  though 404



On Wed, Jul 24, 2019 at 11:28 AM Dave S  wrote:

>
>
> On Tuesday, July 23, 2019 at 10:40:27 PM UTC-7, Massimo Di Pierro wrote:
>>
>> OK. I know. I am not good with names.
>> But there are lots of requirements to be fulfilled.
>> py4web.com was available and the pypi package was available.
>> Here is running on google cloud:
>> http://py4web.com/
>>
>> Ducking...
>>
>>
> Thumbs up!
>
> (But _dashboard was 404)
>
> /dps
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/b8951d9f-f7d3-49ed-9c95-5f85b71657b3%40googlegroups.com
> 
> .
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CA%2BvcePXU4sB4qfNLMUKgUhgSONiPCW83QNebBx_1_1jvbUWKew%40mail.gmail.com.


[web2py] Re: web3py -> py4web

2019-07-23 Thread Dave S


On Tuesday, July 23, 2019 at 10:40:27 PM UTC-7, Massimo Di Pierro wrote:
>
> OK. I know. I am not good with names. 
> But there are lots of requirements to be fulfilled.
> py4web.com was available and the pypi package was available.
> Here is running on google cloud:
> http://py4web.com/
>
> Ducking...
>
>
Thumbs up!

(But _dashboard was 404)

/dps
 

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b8951d9f-f7d3-49ed-9c95-5f85b71657b3%40googlegroups.com.


[web2py] Re: Web3py

2019-06-22 Thread 黄祥
tested on ubuntu docker for pip3 install web3py with simple app (worked)
*steps*
apt install -y git python3-pip cython3 
cd
git clone https://github.com/web2py/web3py
cd web3py
python3 setup.py install
pip3 install web3py
cd 
mkdir -p ~/apps/test/databases
cat << EOF > ~/apps/test/__init__.py
import os
from web3py import *
db = DAL('sqlite://test', folder=os.path.join(os.path.dirname(__file__), 
'databases'))
db.define_table('table0', Field('field0') )
if db(db.table0).count() == 0:
db.table0.insert(field0 = 'field 0')
db.table0.insert(field0 = 'field 1')
db.commit()
@action('rows_as_json/', method = 'GET')
@action.uses(db)
def rows_as_json(table_name):
query = (db[table_name]['id'] > 0)
rows = db(query).select().as_json()
response.content_type = 'application/json; charset=utf-8'
return rows
#return dict(rows = rows)
EOF
touch ./apps/__init__.py
cd ~/apps
cd
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
/usr/local/bin/web3py-start -p ./password.txt -a 0.0.0.0:8000 ./apps &

*test on terminal*
$ curl -X GET -i http://localhost:8000/test/rows_as_json/table0
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 64
Server: TornadoServer/6.0.2

[{"id": 1, "field0": "field 0"}, {"id": 2, "field0": "field 1"}]

*test on browser : http://localhost:8000/test/rows_as_json/table0*
[{"id": 1, "field0": "field 0"}, {"id": 2, "field0": "field 1"}]

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/c1cfab67-43c0-4a27-8973-503fd24a2c89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-22 Thread 黄祥

>
> Ideas about how to ship apps when pip installing web3py?


pardon, for current stage, can not, because you must:
- clone web3py repo
- run python3 setup.py install
- then successfull install pip3 install web3py
which imo inefficient
detail tested on previous messages 
*ref (tests 5 works):*
https://groups.google.com/d/msg/web2py/saav4hQdbSU/7hCrxV_ZBAAJ

just an idea, perhaps if you've fixed pypi modules, think, user can either 
extract the webapps (zip or tar) or clone the opened repo url, then execute 
with 
*e.g. for extracted*
cd 
mkdir ~/apps
touch ./apps/__init__.py
cd ~/apps
unzip client_a.zip
cd
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
/usr/local/bin/web3py-start -p ./password.txt -a 0.0.0.0:8000 ./apps

*e.g. for git*
cd 
mkdir ~/apps
touch ./apps/__init__.py
cd ~/apps
git clone http://github.com/user/client_b
cd
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
/usr/local/bin/web3py-start -p ./password.txt -a 0.0.0.0:8000 ./apps

*note*
- after it's successufl installed pip3 install web3py, consider there is no 
_dashboard, so can't pack or unpack just like in web2py using appadmin
- not sure is it a bug or in dev progress, but for me, must initialy create 
__init__.py on apps folder is inefficient, the problem if just an error 
traceback we can ignore it, but the problem is the web server won't start, 
so not sure, as u can see, in latest docker step is also create that file 
to ensure that web server can run

best regards,
stifan 

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/1259add7-8c4d-4d85-a87c-08e0543e18fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-22 Thread Massimo Di Pierro
Ideas about how to ship apps when pip installing web3py?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/1102859b-0f8e-4203-950b-960533482fb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-21 Thread 黄祥
compared the lightweight between alpine, ubuntu n debian, results are :
*alpine (around 300mb) < ubuntu** (around 700mb)** < debian** (around 
700mb)*
$ docker history alpine/web3py
IMAGE   CREATED CREATED BY 
 SIZE COMMENT
55fe7b3c18bf38 seconds ago  /bin/sh -c #(nop)  CMD 
["./web3py-start" "-p…   0B
11963850a68b38 seconds ago  /bin/sh -c #(nop)  EXPOSE 8000 
 0B
81ccd5d75ac238 seconds ago  /bin/sh -c #(nop) WORKDIR 
/home/web3py/web3py   0B
d22d1bcb98d439 seconds ago  /bin/sh -c rm -rf /home/web3py/web3py 
&&  cd…   83.3MB
3ed853d7f4852 minutes ago   /bin/sh -c #(nop)  USER web3py 
 0B
ac5d2ae76dc02 minutes ago   /bin/sh -c apk add --no-cache git 
py3-pip gc…   215MB
4d90542f06232 days ago  /bin/sh -c #(nop)  CMD ["/bin/sh"] 
 0B
   2 days ago  /bin/sh -c #(nop) ADD 
file:fef3b00b3ae63967d…   5.58MB
$ docker history ubuntu/web3py
IMAGE   CREATED CREATED BY 
 SIZE COMMENT
5915652d659c1 second ago/bin/sh -c #(nop)  CMD 
["./web3py-start" "-p…   0B
efaa28db03b12 seconds ago   /bin/sh -c #(nop)  EXPOSE 8000 
 0B
7776a0d48c7b2 seconds ago   /bin/sh -c #(nop) WORKDIR 
/home/web3py/web3py   0B
4ed2500a0ead2 seconds ago   /bin/sh -c rm -rf /home/web3py/web3py 
&&  cd…   90.1MB
a70df445435535 seconds ago  /bin/sh -c #(nop)  USER web3py 
 0B
86376b78852636 seconds ago  /bin/sh -c apt update &&  apt 
install -y git…   529MB
4c108a37151f3 days ago  /bin/sh -c #(nop)  CMD 
["/bin/bash"]0B
   3 days ago  /bin/sh -c mkdir -p /run/systemd && 
echo 'do…   7B
   3 days ago  /bin/sh -c set -xe   && echo 
'#!/bin/sh' 
> /…   745B
   3 days ago  /bin/sh -c [ -z "$(apt-get 
indextargets)" ] 987kB
   3 days ago  /bin/sh -c #(nop) ADD 
file:4e6b5d9ca371eb881…   63.2MB
$ docker history debian/web3py
IMAGE   CREATED CREATED BY 
 SIZE COMMENT
fdf71e00b1b96 seconds ago   /bin/sh -c #(nop)  CMD 
["./web3py-start" "-p…   0B
f4f5f5d3be086 seconds ago   /bin/sh -c #(nop)  EXPOSE 8000 
 0B
bc04fba303866 seconds ago   /bin/sh -c #(nop) WORKDIR 
/home/web3py/web3py   0B
261c6fc067187 seconds ago   /bin/sh -c rm -rf /home/web3py/web3py 
&&  cd…   90.7MB
2940c010507b43 seconds ago  /bin/sh -c #(nop)  USER web3py 
 0B
d7125603a13945 seconds ago  /bin/sh -c apt update &&  apt 
install -y git…   536MB
e1de74e67cc711 days ago /bin/sh -c #(nop)  CMD ["bash"] 
0B
   11 days ago /bin/sh -c #(nop) ADD 
file:6e8620824300ccf37…   101MB

Dockerfile for alpine is same like prev msg, while ubuntu n debian is alike 
the alpine (modified from github), ubuntu n debian steps is same just base 
image is different
cat << EOF > Dockerfile
FROM debian:latest

RUN apt update && \
 apt install -y git python3-pip python-pip memcached && \
 service memcached restart && \
 groupadd -r web3py && \
 useradd -m -r -g web3py web3py

USER web3py

RUN rm -rf /home/web3py/web3py && \
 cd /home/web3py/ && \
 git clone https://github.com/web2py/web3py && \
 cd web3py && \
 pip3 install pytest mechanize twine && \
 pip3 install -U -r requirements.txt && \
 make test && \
 python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('password_admin' )[0] ) )" && \
 mkdir apps/_scaffold/databases && \
 mkdir apps/examples/databases && \
 touch apps/__init__.py

WORKDIR /home/web3py/web3py

EXPOSE 8000

CMD ["./web3py-start", "-p", "./password.txt", "-a", "0.0.0.0:8000", 
"./apps"]
EOF
cat Dockerfile
docker build -t debian/web3py .

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/69b3e9cc-c169-4cff-b316-38f5ae3488de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-21 Thread 黄祥
tested work Dockerfile alpine base image while execute 'make test', never 
thought the service started itself after installed, checked using service 
command in package openrc
cat << EOF > Dockerfile
FROM alpine:latest

RUN apk add --no-cache git py3-pip gcc python3-dev musl-dev memcached 
openrc make && \
 addgroup -S web3py && \
 adduser -D -G web3py web3py

USER web3py

RUN rm -rf /home/web3py/web3py && \
 cd /home/web3py && \
 export PATH="\$PATH:\$HOME/.local/bin" && \
 git clone https://github.com/web2py/web3py && \
 cd web3py && \
 pip3 install -U --user pytest mechanize twine && \
 pip3 install -U --user -r requirements.txt && \
 make test && \
 python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('password_admin' )[0] ) )" && \
 mkdir apps/_scaffold/databases && \
 mkdir apps/examples/databases && \
 touch apps/__init__.py

WORKDIR /home/web3py/web3py

EXPOSE 8000

CMD ["./web3py-start", "-p", "./password.txt", "-a", "0.0.0.0:8000", 
"./apps"]
EOF
cat Dockerfile
docker build -t alpine/web3py .
docker run -d \
 -p 8000:8000 \
 --name web3py \
 alpine/web3py

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8f350573-be1a-44b9-be67-b0e16f784ab8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-21 Thread 黄祥
tested work Dockerfile with alpine base image
cat << EOF > Dockerfile
FROM alpine:latest

RUN apk add --no-cache git py3-pip gcc python3-dev musl-dev && \
 addgroup -S web3py && \
 adduser -D -G web3py web3py

USER web3py

RUN rm -rf /home/web3py/web3py && \
 cd /home/web3py && \
 export PATH="\$PATH:\$HOME/.local/bin" && \
 git clone https://github.com/web2py/web3py && \
 cd web3py && \
 pip3 install -U --user pytest mechanize twine && \
 pip3 install -U --user -r requirements.txt && \
 python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('password_admin' )[0] ) )" && \
 mkdir apps/_scaffold/databases && \
 mkdir apps/examples/databases && \
 touch apps/__init__.py

WORKDIR /home/web3py/web3py

EXPOSE 8000

CMD ["./web3py-start", "-p", "./password.txt", "-a", "0.0.0.0:8000", 
"./apps"]
EOF
cat Dockerfile
docker build -t alpine/web3py .
docker run -d \
 -p 8000:8000 \
 --name web3py \
 alpine/web3py

*note:*
different from ubuntu or debian Dockerfile in github are :
1. ubuntu or debian execute : make test, while in alpine can not, because, 
in alpine can't start the service in background with : /usr/bin/memcached 
-u memcached &, while in ubuntu or debian execute with : service memcached 
start (make test required memcached service started)
perhaps any other idea how to run service in background with the path in 
alpine ? ur welcome
2. pip3 install must use --user in alpine and add the $HOME/.local/bin in 
the path, while in ubuntu or debian unneccessary
3. touch apps/__init__.py is neccessary to run the web server, this is 
web3py/apps related, and not updated on github Dockerfile yet
4. want to update in github or create separate dockerfile base image ?

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/161bd0a9-c5e0-42a9-ade8-0ce7379d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-20 Thread 黄祥
as question on github, here another alternative works without using ubuntu 
or debian image base file (which posted on prev msg)
docker pull alpine
docker run -it --privileged alpine /bin/sh

apk add --no-cache git py3-pip memcached gcc python3-dev musl-dev make 
/usr/bin/memcached -u memcached &
cd
git clone https://github.com/web2py/web3py
cd web3py
pip3 install pytest mechanize twine
pip3 install -U -r requirements.txt
make test
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
mkdir apps/_scaffold/databases
mkdir apps/examples/databases
touch apps/__init__.py
./web3py-start -p password.txt -a 0.0.0.0:8000 apps

*note :*
- test put the steps above in Dockerfile and build it, not work due to 
/bin/sh: git not found, still find the solution
- test python base image (just pull the base image), seems heavier than 
ubuntu or debian or alpine
- if test using ngrok in alpine consider using 386 version, amd64 not work 
in alpine, ngrok amd64 tested work in ubuntu n debian

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/a32cddba-7279-4a2f-90eb-9e24a4eb1c4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-19 Thread Massimo Di Pierro
I believe I have a solution in the last commit: 
44904e47f5b5eec89b06ec332bd3094ec76ec3dd

If should allow to do

db.mytable.myfield.readable = True

@action('index')
@action.uses(db)
def index():
db.mytable.myfield.readable = False

and makes db.mytable.myfield.readable thread safe while, every http 
request, sees the default values defined at the top level.

I have tested the module I created to achieve this but I have not tested 
its application to the Field class.

Also this is not necessarily final since it is a first version of the 
threadsafevariable library.

If you can think of more ways to test it, it would be appreciated.

Massimo


On Wednesday, 19 June 2019 07:55:55 UTC-7, Marcelo Huerta wrote:
>
> El viernes, 14 de junio de 2019, 11:32:58 (UTC-3), Massimo Di Pierro 
> escribió:
>>
>> Be careful that you can no longer change attributes everywhere you like 
>> as in:
>>
>> db.tablename.fieldname.readable = False
>>
>> In web2py this is ok. In web3py this is not safe. Attributes must be 
>> global. The state of fixtures must not be modified inside actions.
>>
>>
>>
> And what's the corresponding replacement if you want to change the status 
> of "visible" or "readable" only during an action?
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8214b5e1-3898-4854-9f64-a17e08f04b68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-19 Thread Marcelo Huerta
El viernes, 14 de junio de 2019, 11:32:58 (UTC-3), Massimo Di Pierro 
escribió:
>
> Be careful that you can no longer change attributes everywhere you like as 
> in:
>
> db.tablename.fieldname.readable = False
>
> In web2py this is ok. In web3py this is not safe. Attributes must be 
> global. The state of fixtures must not be modified inside actions.
>
>
>
And what's the corresponding replacement if you want to change the status 
of "visible" or "readable" only during an action?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/00f068cf-a914-4459-ab51-a8c65c6d8ed5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Web3py

2019-06-16 Thread Massimo DiPierro
Not with the usual syntax. Looking for a way to allow this in the new form
api

On Sun, Jun 16, 2019, 09:51 Fekete Zoltán  wrote:

> Hi Massimo,
>
> In web2py I highly rely on dynamically modifiable forms. Based on
> calculations some fields are required or even hidden, others not.
>
> Will be possible to do so in web3py?
>
> Thank you,
>
> FeZ
>
> On 2019. június 15. 8:17:43 Massimo Di Pierro 
> wrote:
>
>> db.tablename.fieldname.readable = False # SAFE
>> def test():
>> db.tablename.fieldname.readable = False # NOT SAFE
>>
>> *models.py*
>> def on_define_tablename(table):
>> table.fieldname.readable = False # SAFE
>> db.define_table('tablename',
>> Field('fieldname'),
>> on_define = on_define_tablename)
>>
>> BUT things like on_define = on_define_tablename
>> are no longer necessary in web3py. Tables are defined when the files are
>> imported not at every request (like in web2py) and therefore you do not
>> need optimization tricks any more.
>>
>>
>> On Friday, 14 June 2019 22:03:04 UTC-7, 黄祥 wrote:
>>>
>>> Be careful that you can no longer change attributes everywhere you like
 as in:

 db.tablename.fieldname.readable = False

 In web2py this is ok. In web3py this is not safe. Attributes must be
 global. The state of fixtures must not be modified inside actions.

>>>
>>> is it mean in controller not safe, but in on_define, safe or not ?
>>> *e.g.*
>>> *controller.py*
>>> db.tablename.fieldname.readable = False # not safe in web3py
>>> def test():
>>> db.tablename.fieldname.readable = False # not safe in web3py
>>>
>>> *models.py*
>>> def on_define_tablename(table):
>>> table.fieldname.readable = False # safe or not ?
>>> db.define_table('tablename',
>>> Field('fieldname'),
>>> on_define = on_define_tablename)
>>>
>>> best regards,
>>> stifan
>>>
>>>
>>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/82e955db-788c-4280-9504-0bbd242882eb%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAJYrZrnUquuSCkGkHYVPQ1CzQfZh2fsDLBKzZzQu1%3DjB2n6nYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-15 Thread 黄祥
still have an error, a bit different told about __iter__ and __len__
$ pip3 install -U -r requirements.txt
Successfully built yatl
Installing collected packages: yatl
  Found existing installation: yatl 1.0.6
Uninstalling yatl-1.0.6:
  Successfully uninstalled yatl-1.0.6
Successfully installed yatl-1.0.7

ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 416, in 
wrapper
ret = dumps(ret)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 157, in 
dumps
return json.dumps(obj, default=objectify, sort_keys=sort_keys, indent=
indent)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/__init__.py", 
line 238, in dumps
**kw).encode(obj)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py", 
line 201, in encode
chunks = list(chunks)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py", 
line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py", 
line 405, in _iterencode_dict
yield from chunks
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py", 
line 438, in _iterencode
o = _default(o)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 146, in 
objectify
return list(obj)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
, line 222, in __iter__
for c in str(self):
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
, line 222, in __iter__
for c in str(self):
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
, line 222, in __iter__
for c in str(self):
  [Previous line repeated 481 more times]
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
, line 226, in __len__
return len(self.text)
RecursionError: maximum recursion depth exceeded while calling a Python 
object

thx n best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/c41a8e71-02f0-4b03-a6a8-5d3499946c15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-15 Thread Massimo Di Pierro
was a yatl bug in len(XML('')) 
now fixed in yatl

On Saturday, 15 June 2019 00:56:45 UTC-7, 黄祥 wrote:
>
> *work in web2py*
> def json_row_as_list():
> if not request.env.request_method == 'GET': raise HTTP(403)
> import json
> table_name = request.args(0)
> id = request.args(1)
> if id.isdigit() and int(id) > 0:
> query = (db[table_name]['id'] == id)
> else:
> query = (db[table_name]['id'] > 0)
> rows = db(query).select()
> json_list = json.dumps(rows.as_list(), default = str, sort_keys = True
> )
> return dict(data = XML(json_list) )
>
> *in web3py return an error when using XML() helper, but when not using 
> XML() helper it works fine in web3py*
> *code*
> from yatl.helpers import XML
> @action('api/json_row_as_list//', method = 'GET')
> @action.uses(db)
> def json_row_as_list(table_name, id):
> import json
> if id.isdigit() and int(id) > 0:
> query = (db[table_name]['id'] == id)
> else:
> query = (db[table_name]['id'] > 0)
> row = db(query).select()
> json_list = json.dumps(row.as_list(), default = str, sort_keys = True)
> return dict(data = XML(json_list) )
>
> *result*
> ERROR:root:Traceback (most recent call last):
>   File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 416, in 
> wrapper
> ret = dumps(ret)
>   File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 157, in 
> dumps
> return json.dumps(obj, default=objectify, sort_keys=sort_keys, indent=
> indent)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/__init__.py"
> , line 238, in dumps
> **kw).encode(obj)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py"
> , line 201, in encode
> chunks = list(chunks)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py"
> , line 431, in _iterencode
> yield from _iterencode_dict(o, _current_indent_level)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py"
> , line 405, in _iterencode_dict
> yield from chunks
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py"
> , line 438, in _iterencode
> o = _default(o)
>   File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 146, in 
> objectify
> return list(obj)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
> , line 226, in __len__
> return len(str(self))
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
> , line 226, in __len__
> return len(str(self))
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
> , line 226, in __len__
> return len(str(self))
>   [Previous line repeated 482 more times]
> RecursionError: maximum recursion depth exceeded while calling a Python 
> object
>
> *code*
> from yatl.helpers import XML
> @action('api/json_row_as_list//', method = 'GET')
> @action.uses(db)
> def json_row_as_list(table_name, id):
> import json
> if id.isdigit() and int(id) > 0:
> query = (db[table_name]['id'] == id)
> else:
> query = (db[table_name]['id'] > 0)
> row = db(query).select()
> json_list = json.dumps(rowhttp://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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/bc03d136-fb59-4222-b93b-11b2d336d940%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-15 Thread 黄祥
*work in web2py*
def json_row_as_list():
if not request.env.request_method == 'GET': raise HTTP(403)
import json
table_name = request.args(0)
id = request.args(1)
if id.isdigit() and int(id) > 0:
query = (db[table_name]['id'] == id)
else:
query = (db[table_name]['id'] > 0)
rows = db(query).select()
json_list = json.dumps(rows.as_list(), default = str, sort_keys = True)
return dict(data = XML(json_list) )

*in web3py return an error when using XML() helper, but when not using 
XML() helper it works fine in web3py*
*code*
from yatl.helpers import XML
@action('api/json_row_as_list//', method = 'GET')
@action.uses(db)
def json_row_as_list(table_name, id):
import json
if id.isdigit() and int(id) > 0:
query = (db[table_name]['id'] == id)
else:
query = (db[table_name]['id'] > 0)
row = db(query).select()
json_list = json.dumps(row.as_list(), default = str, sort_keys = True)
return dict(data = XML(json_list) )

*result*
ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 416, in 
wrapper
ret = dumps(ret)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 157, in 
dumps
return json.dumps(obj, default=objectify, sort_keys=sort_keys, indent=
indent)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/__init__.py", 
line 238, in dumps
**kw).encode(obj)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py", 
line 201, in encode
chunks = list(chunks)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py", 
line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py", 
line 405, in _iterencode_dict
yield from chunks
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/encoder.py", 
line 438, in _iterencode
o = _default(o)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 146, in 
objectify
return list(obj)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
, line 226, in __len__
return len(str(self))
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
, line 226, in __len__
return len(str(self))
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/helpers.py"
, line 226, in __len__
return len(str(self))
  [Previous line repeated 482 more times]
RecursionError: maximum recursion depth exceeded while calling a Python 
object

*code*
from yatl.helpers import XML
@action('api/json_row_as_list//', method = 'GET')
@action.uses(db)
def json_row_as_list(table_name, id):
import json
if id.isdigit() and int(id) > 0:
query = (db[table_name]['id'] == id)
else:
query = (db[table_name]['id'] > 0)
row = db(query).select()
json_list = json.dumps(row.as_list(), default = str, sort_keys = True)
return XML(json_list)

*result*
Critical error while processing request: 
/test/api/json_row_as_list/bank/1ERROR:tornado.access:500 GET 
/test/api/json_row_as_list/bank/1 (127.0.0.1) 2.65ms


*execute in terminal*
curl -X GET -i http://localhost:8000/test/api/json_row_as_list/bank/1

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d7f52f3b-459f-4168-9017-1267086373c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-15 Thread Massimo Di Pierro
db.tablename.fieldname.readable = False # SAFE
def test():
db.tablename.fieldname.readable = False # NOT SAFE

*models.py*
def on_define_tablename(table): 
table.fieldname.readable = False # SAFE
db.define_table('tablename', 
Field('fieldname'), 
on_define = on_define_tablename)

BUT things like on_define = on_define_tablename
are no longer necessary in web3py. Tables are defined when the files are 
imported not at every request (like in web2py) and therefore you do not 
need optimization tricks any more.


On Friday, 14 June 2019 22:03:04 UTC-7, 黄祥 wrote:
>
> Be careful that you can no longer change attributes everywhere you like as 
>> in:
>>
>> db.tablename.fieldname.readable = False
>>
>> In web2py this is ok. In web3py this is not safe. Attributes must be 
>> global. The state of fixtures must not be modified inside actions.
>>
>
> is it mean in controller not safe, but in on_define, safe or not ?
> *e.g.*
> *controller.py*
> db.tablename.fieldname.readable = False # not safe in web3py
> def test():
> db.tablename.fieldname.readable = False # not safe in web3py
>
> *models.py*
> def on_define_tablename(table): 
> table.fieldname.readable = False # safe or not ?
> db.define_table('tablename', 
> Field('fieldname'), 
> on_define = on_define_tablename)
>
> best regards,
> stifan
>
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/82e955db-788c-4280-9504-0bbd242882eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-15 Thread Massimo Di Pierro
Does not exist because it is always lazy by default.

On Friday, 14 June 2019 21:53:54 UTC-7, 黄祥 wrote:
>
> *url* = 
>> http://localhost:8000/_dashboard/dbadmin?app=test=db=address
>> *result* = { "__class__": "lazyT", "kwargs": {}, "text": "Field 0", 
>> "translator": { "__class__": "method" } }
>> *expected result *= Field 0
>> no error occured but the result is not expected
>>
>
> there's told about lazyT, so put it lazy (which work in web2py), but 
> return an error on web3py
> def on_define_address(table): 
> table.street.label = T('Street', lazy = True)
>
> Traceback (most recent call last):
>   File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 614, in 
> import_apps
> module = importlib.machinery.SourceFileLoader(module_name, init).
> load_module()
>   File "", line 407, in 
> _check_name_wrapper
>   File "", line 907, in load_module
>   File "", line 732, in load_module
>   File "", line 265, in _load_module_shim
>   File "", line 696, in _load
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in 
> _call_with_frames_removed
>   File "/Users/sugizo/learn/python/web3py/apps/test/__init__.py", line 1, 
> in 
> from .controllers.install import *
>   File 
> "/Users/sugizo/learn/python/web3py/apps/test/controllers/install.py", 
> line 2, in 
> from ..models.db_schema_1_address import *
>   File 
> "/Users/sugizo/learn/python/web3py/apps/test/models/db_schema_1_address.py"
> , line 54, in 
> format = lambda r: \
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
> , line 592, in define_table
> table = self.lazy_define_table(tablename, *fields, **kwargs)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
> , line 633, in lazy_define_table
> on_define(table)
>   File 
> "/Users/sugizo/learn/python/web3py/apps/test/models/db_schema_1_address.py"
> , line 8, in on_define_address
> table.street.label = T('Street', lazy = True)
> TypeError: __call__() got an unexpected keyword argument 'lazy'
>
> best regards,
> stifan
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ccfec337-af57-4788-ad45-48f5213c7eaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-14 Thread 黄祥

>
> Be careful that you can no longer change attributes everywhere you like as 
> in:
>
> db.tablename.fieldname.readable = False
>
> In web2py this is ok. In web3py this is not safe. Attributes must be 
> global. The state of fixtures must not be modified inside actions.
>

is it mean in controller not safe, but in on_define, safe or not ?
*e.g.*
*controller.py*
db.tablename.fieldname.readable = False # not safe in web3py
def test():
db.tablename.fieldname.readable = False # not safe in web3py

*models.py*
def on_define_tablename(table): 
table.fieldname.readable = False # safe or not ?
db.define_table('tablename', 
Field('fieldname'), 
on_define = on_define_tablename)

best regards,
stifan


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/51987943-74b7-4fba-85be-6446e291874b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-14 Thread 黄祥

>
> *url* = 
> http://localhost:8000/_dashboard/dbadmin?app=test=db=address
> *result* = { "__class__": "lazyT", "kwargs": {}, "text": "Field 0", 
> "translator": { "__class__": "method" } }
> *expected result *= Field 0
> no error occured but the result is not expected
>

there's told about lazyT, so put it lazy (which work in web2py), but return 
an error on web3py
def on_define_address(table): 
table.street.label = T('Street', lazy = True)

Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 614, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 407, in 
_check_name_wrapper
  File "", line 907, in load_module
  File "", line 732, in load_module
  File "", line 265, in _load_module_shim
  File "", line 696, in _load
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/Users/sugizo/learn/python/web3py/apps/test/__init__.py", line 1, in 

from .controllers.install import *
  File "/Users/sugizo/learn/python/web3py/apps/test/controllers/install.py", 
line 2, in 
from ..models.db_schema_1_address import *
  File 
"/Users/sugizo/learn/python/web3py/apps/test/models/db_schema_1_address.py", 
line 54, in 
format = lambda r: \
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
, line 592, in define_table
table = self.lazy_define_table(tablename, *fields, **kwargs)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
, line 633, in lazy_define_table
on_define(table)
  File 
"/Users/sugizo/learn/python/web3py/apps/test/models/db_schema_1_address.py", 
line 8, in on_define_address
table.street.label = T('Street', lazy = True)
TypeError: __call__() got an unexpected keyword argument 'lazy'

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/73b730e3-7839-422f-8d2e-4a8e744ed239%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Web3py FORM referenced fields

2019-06-14 Thread Massimo Di Pierro
Thanks. That clarifies. Will fix later today.

On Wednesday, 12 June 2019 23:25:26 UTC-7, John Bannister wrote:
>
> Hi Massimo,
>
>  
>
> Issue is not the dropdown for referenced fields on an Add rec as  that 
> works fine. Issue is when you want to edit a record with a referenced field 
> so 
>
>  
>
> form=Form(db.order, record=id)
>
>  
>
> Referenced field is blank (although dropdown is available). All other 
> fields are populated with db values.
>
>  
>
> BR
>
> John
>
>  
>
>  
>
>  
>
> *From:* web2py@googlegroups.com [mailto:web2py@googlegroups.com] *On 
> Behalf Of *Massimo Di Pierro
> *Sent:* 13 June 2019 05:09
> *To:* web2py-users
> *Subject:* [web2py] Re: Web3py FORM referenced fields
>
>  
>
> I added an example that works for me.
>
> Maybe can help you debug the problem:
>
>  
>
> http://127.0.0.1:8000/examples/dbform2
>
>
> On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote:
>
> Hi All,
>
>  
>
> Does anyone have a working example of web3py Form using referenced fields?
>
>  
>
> I have created the standard person / pets tables with pets referencing 
> person as 'reference person' in the table definition.
>
>  
>
> Using form=Form(db.pet) I get the dropdown of persons for the add no 
> worries but on the form=Form(db.pet, record=id) for the edit form .. 
> neither the id of the person or the persons name (format='%(name)s' is 
> displayed even though I can still select from the dropdown list. The id is 
> definately stored in the db.
>
>  
>
> BR
>
> John
>
>  
>
>  
>
>  
>
>  
>
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0973acf7-c76b-4c8e-a5a3-4db3775e96b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-14 Thread Massimo Di Pierro
Try replace cache with 

cache2  = lambda key, f, expiration: cache.get(key,f, expiration)
cache_db = (cache2, cache_time_expire)

On Friday, 14 June 2019 03:32:53 UTC-7, 黄祥 wrote:
>
> cache on select not work, modify apps/todo/api, cacheable=True is work 
> without defining cache
> *apps/todo/__init__.py*
> @action('api')  # a GET API function
> @action.uses(db)# all before starting a db connection
> def todo():
> cache_time_expire = 10
> cache_db = (cache, cache_time_expire)
> return dict(items=db(db.todo).select(orderby=~db.todo.id, cache=
> cache_db, cacheable=True).as_list())
>
> ERROR:root:Traceback (most recent call last):
>   File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 413, in 
> wrapper
> ret = func(*func_args, **func_kwargs)
>   File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 379, in 
> wrapper
> ret = func(*args, **kwargs)
>   File "/Users/sugizo/learn/python/web3py/apps/todo/__init__.py", line 31, 
> in todo
> return dict(items=db(db.todo).select(orderby=~db.todo.id, cache=
> cache_db, cacheable=True).as_list())
>   File 
> "/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/objects.py"
> , line 2395, in select
> return adapter.select(self.query, fields, attributes)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/sqlite.py"
> , line 82, in select
> return super(SQLite, self).select(query, fields, attributes)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/base.py"
> , line 762, in select
> cache, sql, fields, attributes, colnames)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/base.py"
> , line 753, in _cached_select
> time_expire)
> TypeError: 'Cache' object is not callable
>
> *apps/todo/__init__.py*
> @action('api')  # a GET API function
> @action.uses(db)# all before starting a db connection
> def todo():
> cache_time_expire = 10
> cache_db = (cache.memoize(expiration=5), cache_time_expire)
> return dict(items=db(db.todo).select(orderby=~db.todo.id, cache=
> cache_db, cacheable=True).as_list())
>
> ERROR:root:Traceback (most recent call last):
>   File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 413, in 
> wrapper
> ret = func(*func_args, **func_kwargs)
>   File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 379, in 
> wrapper
> ret = func(*args, **kwargs)
>   File "/Users/sugizo/learn/python/web3py/apps/todo/__init__.py", line 31, 
> in todo
> return dict(items=db(db.todo).select(orderby=~db.todo.id, cache=
> cache_db, cacheable=True).as_list())
>   File 
> "/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/objects.py"
> , line 2395, in select
> return adapter.select(self.query, fields, attributes)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/sqlite.py"
> , line 82, in select
> return super(SQLite, self).select(query, fields, attributes)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/base.py"
> , line 762, in select
> cache, sql, fields, attributes, colnames)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/base.py"
> , line 753, in _cached_select
> time_expire)
> TypeError: decorator() takes 1 positional argument but 3 were given
>
> best regards,
> stifan
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/161d0f94-8d18-46a5-9445-0cb072dd42c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-14 Thread Massimo Di Pierro
Be careful that you can no longer change attributes everywhere you like as 
in:

db.tablename.fieldname.readable = False

In web2py this is ok. In web3py this is not safe. Attributes must be 
global. The state of fixtures must not be modified inside actions.

On Thursday, 13 June 2019 17:57:49 UTC-7, 黄祥 wrote:
>
> tryin to move define_tables from web2py to web3py, run well just a few 
> note about field constuctor, (related with ui, FORM and T) :
> - comment : run well, but if you  not use bootstrap, then it's should be 
> modified (e.g. _class or function modal in boostrap)
> - represent : run well, but if you  not use bootstrap, then it's should be 
> modified (e.g. _class)
> - widget : not sure how to use it using FORM(), since the book only 
> written using SQLFOrm(), perhaps some guidance
> - labels : run well, but if using T(), the result is not expected when 
> editing in _dashboard (database), detail in previous msg
>
> just tests the models part, not yet using any controllers
>
> best regards,
> stifan
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f43f434a-0d75-469e-81c5-6b2de10276bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-14 Thread 黄祥
cache on select not work, modify apps/todo/api, cacheable=True is work 
without defining cache
*apps/todo/__init__.py*
@action('api')  # a GET API function
@action.uses(db)# all before starting a db connection
def todo():
cache_time_expire = 10
cache_db = (cache, cache_time_expire)
return dict(items=db(db.todo).select(orderby=~db.todo.id, cache=cache_db
, cacheable=True).as_list())

ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 413, in 
wrapper
ret = func(*func_args, **func_kwargs)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 379, in 
wrapper
ret = func(*args, **kwargs)
  File "/Users/sugizo/learn/python/web3py/apps/todo/__init__.py", line 31, 
in todo
return dict(items=db(db.todo).select(orderby=~db.todo.id, cache=cache_db
, cacheable=True).as_list())
  File 
"/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/objects.py"
, line 2395, in select
return adapter.select(self.query, fields, attributes)
  File 
"/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/sqlite.py"
, line 82, in select
return super(SQLite, self).select(query, fields, attributes)
  File 
"/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 762, in select
cache, sql, fields, attributes, colnames)
  File 
"/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 753, in _cached_select
time_expire)
TypeError: 'Cache' object is not callable

*apps/todo/__init__.py*
@action('api')  # a GET API function
@action.uses(db)# all before starting a db connection
def todo():
cache_time_expire = 10
cache_db = (cache.memoize(expiration=5), cache_time_expire)
return dict(items=db(db.todo).select(orderby=~db.todo.id, cache=cache_db
, cacheable=True).as_list())

ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 413, in 
wrapper
ret = func(*func_args, **func_kwargs)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 379, in 
wrapper
ret = func(*args, **kwargs)
  File "/Users/sugizo/learn/python/web3py/apps/todo/__init__.py", line 31, 
in todo
return dict(items=db(db.todo).select(orderby=~db.todo.id, cache=cache_db
, cacheable=True).as_list())
  File 
"/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/objects.py"
, line 2395, in select
return adapter.select(self.query, fields, attributes)
  File 
"/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/sqlite.py"
, line 82, in select
return super(SQLite, self).select(query, fields, attributes)
  File 
"/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 762, in select
cache, sql, fields, attributes, colnames)
  File 
"/Users/sugizo/miniconda3/envs/python3_todo/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 753, in _cached_select
time_expire)
TypeError: decorator() takes 1 positional argument but 3 were given

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/86bd1e59-98e0-48c0-83cb-93fb0b30b09b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-13 Thread 黄祥
represent doesn't show the content of the table field properly in 
_dashboard (database)
- type of field is reference (show but the content just Ref.[id], e.g. 
Ref.[4]
- type of field is list:string (doesn't show at all), yet the field is 
filled, checked in database

attached : screen_shot.png

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/14c44c9f-a207-4fc6-9a65-4794e76cbc3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-13 Thread 黄祥
tryin to move define_tables from web2py to web3py, run well just a few note 
about field constuctor, (related with ui, FORM and T) :
- comment : run well, but if you  not use bootstrap, then it's should be 
modified (e.g. _class or function modal in boostrap)
- represent : run well, but if you  not use bootstrap, then it's should be 
modified (e.g. _class)
- widget : not sure how to use it using FORM(), since the book only written 
using SQLFOrm(), perhaps some guidance
- labels : run well, but if using T(), the result is not expected when 
editing in _dashboard (database), detail in previous msg

just tests the models part, not yet using any controllers

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b686242a-886e-4db3-b15b-da7d4ebdf354%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-13 Thread 黄祥
*models/db_schema_1_address.py*
from web3py import Field
from .db import *
def on_define_address(table): 
table.field0.label = T('Field 0')
db.define_table('address', 
Field('field0'), 
on_define = on_define_address, 
migrate = 'address.table')

*test 1*
*url* = 
http://localhost:8000/_dashboard/dbadmin?app=test=db=address
*result* = { "__class__": "lazyT", "kwargs": {}, "text": "Field 0", 
"translator": { "__class__": "method" } }
*expected result *= Field 0
no error occured but the result is not expected

*test 2*
must set migrate = 'address.table' if not an error occured
Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 614, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 407, in 
_check_name_wrapper
  File "", line 907, in load_module
  File "", line 732, in load_module
  File "", line 265, in _load_module_shim
  File "", line 696, in _load
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/Users/sugizo/learn/python/web3py/apps/test/__init__.py", line 1, in 

from .models.db_schema_1_address import *
  File 
"/Users/sugizo/learn/python/web3py/apps/test/models/db_schema_1_address.py", 
line 10, in 
on_define = on_define_address)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
, line 592, in define_table
table = self.lazy_define_table(tablename, *fields, **kwargs)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
, line 626, in lazy_define_table
polymodel=polymodel)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 798, in create_table
return self.migrator.create_table(*args, **kwargs)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/migrator.py"
, line 281, in create_table
self.adapter.create_sequence_and_triggers(query, table)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 881, in create_sequence_and_triggers
self.execute(query)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/adapters/__init__.py"
, line 67, in wrap
return f(*args, **kwargs)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 413, in execute
rv = self.cursor.execute(command, *args[1:], **kwargs)
sqlite3.OperationalError: table "address" already exists

*test 3*
translations/en.json can't be blank, min contents {},  if not an error 
occured
*e.g.* 
echo {} > translations/en.json # work
touch translations/en.json # not work

Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 614, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 407, in 
_check_name_wrapper
  File "", line 907, in load_module
  File "", line 732, in load_module
  File "", line 265, in _load_module_shim
  File "", line 696, in _load
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/Users/sugizo/learn/python/web3py/apps/test/__init__.py", line 1, in 

from .models.db_schema_1_address import *
  File 
"/Users/sugizo/learn/python/web3py/apps/test/models/db_schema_1_address.py", 
line 3, in 
from .db import *
  File "/Users/sugizo/learn/python/web3py/apps/test/models/db.py", line 6, 
in 
T = Translator(settings.T_FOLDER)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pluralize/__init__.py"
, line 60, in __init__
self.load(folder)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pluralize/__init__.py"
, line 68, in load
self.languages[filename[:-5].lower()] = json.load(fp)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/__init__.py", 
line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw
)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/__init__.py", 
line 348, in loads
return _default_decoder.decode(s)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/decoder.py", 
line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/json/decoder.py", 
line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

best regards,
stifan

-- 
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)

RE: [web2py] Re: Web3py FORM referenced fields

2019-06-13 Thread John Bannister
Hi Massimo,

 

Issue is not the dropdown for referenced fields on an Add rec as  that works 
fine. Issue is when you want to edit a record with a referenced field so 

 

form=Form(db.order, record=id)

 

Referenced field is blank (although dropdown is available). All other fields 
are populated with db values.

 

BR

John

 

 

 

From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of 
Massimo Di Pierro
Sent: 13 June 2019 05:09
To: web2py-users
Subject: [web2py] Re: Web3py FORM referenced fields

 

I added an example that works for me.

Maybe can help you debug the problem:

 

http://127.0.0.1:8000/examples/dbform2


On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote:

Hi All,

 

Does anyone have a working example of web3py Form using referenced fields?

 

I have created the standard person / pets tables with pets referencing person 
as 'reference person' in the table definition.

 

Using form=Form(db.pet) I get the dropdown of persons for the add no worries 
but on the form=Form(db.pet, record=id) for the edit form .. neither the id of 
the person or the persons name (format='%(name)s' is displayed even though I 
can still select from the dropdown list. The id is definately stored in the db.

 

BR

John

 

 

 

 

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com
 
<https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com?utm_medium=email_source=footer>
 .
For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/005701d521b0%24c44dc750%244ce955f0%24%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py FORM referenced fields

2019-06-12 Thread Massimo Di Pierro
I added an example that works for me.
Maybe can help you debug the problem:

http://127.0.0.1:8000/examples/dbform2

On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote:
>
> Hi All,
>
> Does anyone have a working example of web3py Form using referenced fields?
>
> I have created the standard person / pets tables with pets referencing 
> person as 'reference person' in the table definition.
>
> Using form=Form(db.pet) I get the dropdown of persons for the add no 
> worries but on the form=Form(db.pet, record=id) for the edit form .. 
> neither the id of the person or the persons name (format='%(name)s' is 
> displayed even though I can still select from the dropdown list. The id is 
> definately stored in the db.
>
> BR
> John
>
>
>
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py FORM referenced fields

2019-06-12 Thread Massimo Di Pierro
thanks for reporting this. please open a web3py ticket and will look into 
this shortly.

On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote:
>
> Hi All,
>
> Does anyone have a working example of web3py Form using referenced fields?
>
> I have created the standard person / pets tables with pets referencing 
> person as 'reference person' in the table definition.
>
> Using form=Form(db.pet) I get the dropdown of persons for the add no 
> worries but on the form=Form(db.pet, record=id) for the edit form .. 
> neither the id of the person or the persons name (format='%(name)s' is 
> displayed even though I can still select from the dropdown list. The id is 
> definately stored in the db.
>
> BR
> John
>
>
>
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/4ad545c8-9616-4647-acca-719bf077e892%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-11 Thread 黄祥
since cython3 is needed to successful run 'python3 setup.py install' 
(detail in prev messages in this thread), just test it to run with cython3 
in ubuntu docker, pls ignore, if not plan to support cython3 in the future
*steps*
apt install -y git python3-pip cython3
cd
git clone https://github.com/web2py/web3py
cd web3py
pip3 install -U -r requirements.txt
touch ./apps/__init__.py
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
cython3 ./web3py-start -p ./password.txt -a 0.0.0.0:8000 ./apps

*result*
Error compiling Cython file:

...
#!/usr/bin/env python3
^

web3py-start:1:0: 'web3py-start' is not a valid module name
Error compiling Cython file:

...
pbkdf2(1000,20,sha512)$b37e96d6052a3b5a$f62ac366056463d4743a7cf2b04926df35a2ba32
 
 ^

password.txt:1:22: Unrecognized character
[Errno 2] No such file or directory: '/root/web3py/0.0.0.0:8000'

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/fffe3546-12d0-46af-9b5d-9a105977628f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Web3py

2019-06-09 Thread Massimo Di Pierro
please try delete everything in apps/_scaffold/databases/* I was not able 
to reproduce after I did that

On Sunday, 9 June 2019 01:23:08 UTC-7, John Bannister wrote:
>
> I tried  both with and without. Same or very similar result. It is only 
> complaining about the auth_user_tag table which is defined in the auth 
> module.
>
>  
>
> *From:* web2py@googlegroups.com [mailto:web2py@googlegroups.com] *On 
> Behalf Of *Massimo Di Pierro
> *Sent:* 08 June 2019 07:19
> *To:* web2py-users
> *Subject:* [web2py] Re: Web3py
>
>  
>
> try a db.commit() after your define_table(s).
>
> On Monday, 3 June 2019 08:16:27 UTC-7, John Bannister wrote:
>
> Hi All,
>
>  
>
> Finally gotten round to playing again on the latest Web3py.
>
>  
>
> On _scaffold app .. if I add new tables to model file and then reload from 
> the dashboard .. I get errors as follows:-
>
> File "C:\Users\johhb\py3\lib\site-packages\pydal\base.py", line 581, in 
> define_table
>
> raise SyntaxError('table already defined: %s' % tablename)
>
>   File "", line None
>
> SyntaxError: table already defined: auth_user_tag_groups
>
> Only way around it seems to be to delete contents of database folder and 
> restart.
>
>  
>
> Dashboard app hangs on reload sometimes (I think it has to do the with 
> same issue above) and only way to get round it is to restart the server and 
> refresh the _dashboard app. 
>
>  
>
> I really want to start using it to create a few new apps I am due to start 
> working on shortly even though I am well aware that it is not yet 
> production ready so will keep testing and assist wherever I can. Thanks 
> again for all the hard work put in so far I am sure its gonna be a really 
> cool solution.
>
>  
>
> Best Regards
>
> John
>
>  
>
>  
>
> On Thursday, 16 May 2019 17:15:44 UTC+2, John Bannister wrote:
>
> Hi All,
>
>  
>
> Had a first real 'play' with web3py' today and have a few questions the 
> biggest of which I am hoping the gurus will be able to answer:-
>
>  
>
> 1: Is there any way to not to have to restart the app every time changes 
> are made to actions in the controller or new actions added etc? I 
> understand that controllers are basically being imported when the app fires 
> up but is any there any way to occasionally reload instead of having to 
> restart the app? This is a fairly big one for me as sometimes tweaks will 
> need to be made in production and restarting the web server is not really 
> an option so hopefully I am missing something really simple.
>
>  
>
> Thanks in advance
>
> John
>
>  
>
>  
>
>  
>
>  
>
>  
>
>  
>
>   
>
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/33476d6d-05dd-4452-a67b-e919b06d08b6%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/web2py/33476d6d-05dd-4452-a67b-e919b06d08b6%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/2f98fc4f-6d91-4393-bc33-5b2a82f57a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-09 Thread 黄祥
*http://localhost:8000/examples/dbform*
*error on browser*
500
INTERNAL SERVER ERROR

*error on terminal*
ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 413, in 
wrapper
ret = func(*func_args, **func_kwargs)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 381, in 
wrapper
ret = obj.transform(ret)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 213, in 
transform
delimiters=self.delimiters, reader=Template.reader)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/template.py"
, line 968, in render
exec(code, context)
  File "", line 2, in 
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/template.py"
, line 831, in write
data = data.xml()
  File "/Users/sugizo/learn/python/web3py/web3py/utils/form.py", line 245, 
in xml
return self.helper().xml()
  File "/Users/sugizo/learn/python/web3py/web3py/utils/form.py", line 235, 
in helper
self.deletable)
  File "/Users/sugizo/learn/python/web3py/web3py/utils/form.py", line 59, in 
FormStyleDefault
key = control.name.rstrip('/')
AttributeError: 'str' object has no attribute 'name'

*didnt have form validation*
http://localhost:8000/todo/index
http://localhost:8000/_scaffold/auth/login
http://localhost:8000/_scaffold/auth/request_reset_password

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8b97cb69-5449-4f3c-bc97-c12473584f86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [web2py] Re: Web3py

2019-06-09 Thread John Bannister
I tried  both with and without. Same or very similar result. It is only 
complaining about the auth_user_tag table which is defined in the auth module.

 

From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of 
Massimo Di Pierro
Sent: 08 June 2019 07:19
To: web2py-users
Subject: [web2py] Re: Web3py

 

try a db.commit() after your define_table(s).

On Monday, 3 June 2019 08:16:27 UTC-7, John Bannister wrote:

Hi All,

 

Finally gotten round to playing again on the latest Web3py.

 

On _scaffold app .. if I add new tables to model file and then reload from the 
dashboard .. I get errors as follows:-

File "C:\Users\johhb\py3\lib\site-packages\pydal\base.py", line 581, in 
define_table
raise SyntaxError('table already defined: %s' % tablename)
  File "", line None
SyntaxError: table already defined: auth_user_tag_groups

Only way around it seems to be to delete contents of database folder and 
restart.

 

Dashboard app hangs on reload sometimes (I think it has to do the with same 
issue above) and only way to get round it is to restart the server and refresh 
the _dashboard app. 

 

I really want to start using it to create a few new apps I am due to start 
working on shortly even though I am well aware that it is not yet production 
ready so will keep testing and assist wherever I can. Thanks again for all the 
hard work put in so far I am sure its gonna be a really cool solution.

 

Best Regards

John

 

 

On Thursday, 16 May 2019 17:15:44 UTC+2, John Bannister wrote:

Hi All,

 

Had a first real 'play' with web3py' today and have a few questions the biggest 
of which I am hoping the gurus will be able to answer:-

 

1: Is there any way to not to have to restart the app every time changes are 
made to actions in the controller or new actions added etc? I understand that 
controllers are basically being imported when the app fires up but is any there 
any way to occasionally reload instead of having to restart the app? This is a 
fairly big one for me as sometimes tweaks will need to be made in production 
and restarting the web server is not really an option so hopefully I am missing 
something really simple.

 

Thanks in advance

John

 

 

 

 

 

 

  

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/33476d6d-05dd-4452-a67b-e919b06d08b6%40googlegroups.com
 
<https://groups.google.com/d/msgid/web2py/33476d6d-05dd-4452-a67b-e919b06d08b6%40googlegroups.com?utm_medium=email_source=footer>
 .
For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/00d501d51e9c%248f360030%24ada20090%24%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-08 Thread 黄祥
test pip3 install web3py on ubuntu docker container, known work must 
install cython3 to ensure gevent source can be build by gcc, and the 
procedure must clone repo first then run python3 setup.py install, then you 
can successful pip3 install web3py (inefficient i think), detail steps on 
test 5 below
*error traceback*
Collecting web3py
  Downloading https:
//files.pythonhosted.org/packages/ee/a2/f57e1fefb0c62b4423fd76ea359d58d2363982054050b8c0ab54ed4b84c5/web3py-0.1.20190426.tar.gz
Complete output from command python setup.py egg_info:
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/pip-build-fedj6ohs/web3py/setup.py", line 25, in 
long_description=__doc__ + ' (%s)' % get_hash(),
  File "/tmp/pip-build-fedj6ohs/web3py/setup.py", line 13, in get_hash
return subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip
().decode('utf8')
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'rev-parse', 'HEAD']' 
returned non-zero exit status 128.

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-
build-fedj6ohs/web3py/

*test 1 steps : return error traceback above*
apt install -y git python3-pip cython3
pip3 install web3py

*test 2 steps : return error traceback above*
apt install -y git python3-pip cython3
cd
git init
pip3 install web3py

*test 3 steps : return error traceback above*
apt install -y git python3-pip cython3
cd
git clone https://github.com/web2py/web3py
cd web3py
pip3 install web3py

*test 4 steps : return error traceback above*
apt install -y git python3-pip cython3
cd
git clone https://github.com/web2py/web3py
cd web3py
pip3 install -U -r requirements.txt
pip3 install web3py

*test 5 steps : work*
apt install -y git python3-pip cython3 
cd
git clone https://github.com/web2py/web3py
cd web3py
python3 setup.py clean
python3 setup.py build
python3 setup.py install
pip3 install web3py
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
touch apps/__init__.py
/usr/local/bin/web3py-start -p ./password.txt -a 0.0.0.0:8000 ./apps

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e130cce2-43de-44ec-bf9e-edbd267008cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-08 Thread 黄祥
tested latest commit 151 on docker ubuntu 
*problem*
dont have web3py/apps/__init__.py

*solution*
touch web3py/apps/__init__.py

*steps*
apt install -y git python3-pip
pip3 install git+https://github.com/web2py/web3py --upgrade
git clone https://github.com/web2py/web3py
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
web3py-start -p ./password.txt -a 0.0.0.0:8000 /web3py/apps

*result (ended with web server not starting)*
Traceback (most recent call last):
  File "/usr/local/bin/web3py-start", line 11, in 
load_entry_point('web3py==0.1.20190426', 'console_scripts', 
'web3py-start')()
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 717, in 
main
Reloader.import_apps()
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 600, in 
import_apps
module = importlib.machinery.SourceFileLoader('apps', path).load_module
()
  File "", line 399, in 
_check_name_wrapper
  File "", line 823, in load_module
  File "", line 682, in load_module
  File "", line 265, in _load_module_shim
  File "", line 684, in _load
  File "", line 665, in _load_unlocked
  File "", line 674, in exec_module
  File "", line 780, in get_code
  File "", line 832, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 
'/web3py/apps/__init__.py'

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ea6371ac-d65f-4999-9417-9c800e998d7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-08 Thread 黄祥

>
> try a db.commit() after your define_table(s).
>

 already tried, same result (tested on different os), reported on previous 
message in this thread

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/da7caa33-624e-4c94-a0cc-90e3e9463350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-08 Thread Massimo Di Pierro
thanks for this test. very useful. fixed.

On Saturday, 8 June 2019 01:06:07 UTC-7, 黄祥 wrote:
>
> *steps*
>> apt install -y git python3-pip
>> pip3 install git+https://github.com/web2py/web3py --upgrade
>> git clone https://github.com/web2py/web3py
>> python3 -c "from pydal.validators import CRYPT; 
>> open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
>> web3py-start -p ./password.txt -a 0.0.0.0:8000 /web3py/apps
>>
>> *result*
>> [FAILED] loading myapp
>> Traceback (most recent call last):
>>   File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 607, 
>> in import_apps
>> module = importlib.machinery.SourceFileLoader(module_name, init).
>> load_module()
>>   File "", line 399, in 
>> _check_name_wrapper
>>   File "", line 823, in load_module
>>   File "", line 682, in load_module
>>   File "", line 265, in _load_module_shim
>>   File "", line 684, in _load
>>   File "", line 665, in _load_unlocked
>>   File "", line 678, in exec_module
>>   File "", line 219, in 
>> _call_with_frames_removed
>>   File "/root/web3py/apps/myapp/__init__.py", line 1, in 
>> from . import models
>> ModuleNotFoundError: No module named 'apps'
>>
>
> think error traceback is related with the path, but not sure, try it 
> different steps got the same result
> cd web3py/
> web3py-start -p /password.txt -a 0.0.0.0:8000 ./apps
>
> but when execute as written on github readme.md, it can work (notice it 
> execute the one ship with git, not the one installed on 
> /usr/local/bin/web3py-start)
> cd web3py/
> *./*web3py-start -p /password.txt -a 0.0.0.0:8000 ./apps
>
> best regards,
> stifan
>
>
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/dfa6e461-ab3d-49ff-bc51-930c9e37e6bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-08 Thread 黄祥

>
> *steps*
> apt install -y git python3-pip
> pip3 install git+https://github.com/web2py/web3py --upgrade
> git clone https://github.com/web2py/web3py
> python3 -c "from pydal.validators import CRYPT; 
> open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
> web3py-start -p ./password.txt -a 0.0.0.0:8000 /web3py/apps
>
> *result*
> [FAILED] loading myapp
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 607, 
> in import_apps
> module = importlib.machinery.SourceFileLoader(module_name, init).
> load_module()
>   File "", line 399, in 
> _check_name_wrapper
>   File "", line 823, in load_module
>   File "", line 682, in load_module
>   File "", line 265, in _load_module_shim
>   File "", line 684, in _load
>   File "", line 665, in _load_unlocked
>   File "", line 678, in exec_module
>   File "", line 219, in 
> _call_with_frames_removed
>   File "/root/web3py/apps/myapp/__init__.py", line 1, in 
> from . import models
> ModuleNotFoundError: No module named 'apps'
>

think error traceback is related with the path, but not sure, try it 
different steps got the same result
cd web3py/
web3py-start -p /password.txt -a 0.0.0.0:8000 ./apps

but when execute as written on github readme.md, it can work (notice it 
execute the one ship with git, not the one installed on 
/usr/local/bin/web3py-start)
cd web3py/
*./*web3py-start -p /password.txt -a 0.0.0.0:8000 ./apps

best regards,
stifan



-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/cedbbb4d-e76b-4467-be75-5f18371c3d0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-07 Thread Massimo Di Pierro
try a db.commit() after your define_table(s).

On Monday, 3 June 2019 08:16:27 UTC-7, John Bannister wrote:
>
> Hi All,
>
> Finally gotten round to playing again on the latest Web3py.
>
> On _scaffold app .. if I add new tables to model file and then reload from 
> the dashboard .. I get errors as follows:-
>
> File "C:\Users\johhb\py3\lib\site-packages\pydal\base.py", line 581, in 
> define_table
> raise SyntaxError('table already defined: %s' % tablename)
>   File "", line None
> SyntaxError: table already defined: auth_user_tag_groups
>
> Only way around it seems to be to delete contents of database folder and 
> restart.
>
> Dashboard app hangs on reload sometimes (I think it has to do the with 
> same issue above) and only way to get round it is to restart the server and 
> refresh the _dashboard app. 
>
> I really want to start using it to create a few new apps I am due to start 
> working on shortly even though I am well aware that it is not yet 
> production ready so will keep testing and assist wherever I can. Thanks 
> again for all the hard work put in so far I am sure its gonna be a really 
> cool solution.
>
> Best Regards
> John
>
>
> On Thursday, 16 May 2019 17:15:44 UTC+2, John Bannister wrote:
>>
>> Hi All,
>>
>> Had a first real 'play' with web3py' today and have a few questions the 
>> biggest of which I am hoping the gurus will be able to answer:-
>>
>> 1: Is there any way to not to have to restart the app every time changes 
>> are made to actions in the controller or new actions added etc? I 
>> understand that controllers are basically being imported when the app fires 
>> up but is any there any way to occasionally reload instead of having to 
>> restart the app? This is a fairly big one for me as sometimes tweaks will 
>> need to be made in production and restarting the web server is not really 
>> an option so hopefully I am missing something really simple.
>>
>> Thanks in advance
>> John
>>
>>
>>
>>
>>
>>
>>   
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/33476d6d-05dd-4452-a67b-e919b06d08b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-07 Thread 黄祥
found https://pypi.org/project/web3py/ n test it on docker ubuntu return an 
error
*steps*
apt install -y python3-pip
pip3 install web3py

*result*
Collecting web3py
  Downloading https:
//files.pythonhosted.org/packages/ee/a2/f57e1fefb0c62b4423fd76ea359d58d2363982054050b8c0ab54ed4b84c5/web3py-0.1.20190426.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/pip-build-10wpw625/web3py/setup.py", line 25, in 
long_description=__doc__ + ' (%s)' % get_hash(),
  File "/tmp/pip-build-10wpw625/web3py/setup.py", line 13, in get_hash
return subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip
().decode('utf8')
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git': 'git'



Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-
build-10wpw625/web3py/

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/74997409-b9a7-4b6d-a3b3-beb9fea39666%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-07 Thread 黄祥
retest (commits 147) pip install from git repo on docker ubuntu, but got 
different error traceback
*steps*
apt install -y git python3-pip
pip3 install git+https://github.com/web2py/web3py --upgrade
git clone https://github.com/web2py/web3py
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('a' )[0] ) )"
web3py-start -p ./password.txt -a 0.0.0.0:8000 /web3py/apps

*result*
[FAILED] loading _scaffold
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 607, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 399, in 
_check_name_wrapper
  File "", line 823, in load_module
  File "", line 682, in load_module
  File "", line 265, in _load_module_shim
  File "", line 684, in _load
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/root/web3py/apps/_scaffold/__init__.py", line 2, in 
from . import controllers
  File "/root/web3py/apps/_scaffold/controllers.py", line 30, in 
from . common import db, session, T, cache, auth
  File "/root/web3py/apps/_scaffold/common.py", line 7, in 
from web3py.utils.auth import Auth
  File "/usr/local/lib/python3.6/dist-packages/web3py/utils/auth.py", line 5
, in 
import requests
ModuleNotFoundError: No module named 'requests'

[FAILED] loading myapp
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 607, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 399, in 
_check_name_wrapper
  File "", line 823, in load_module
  File "", line 682, in load_module
  File "", line 265, in _load_module_shim
  File "", line 684, in _load
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/root/web3py/apps/myapp/__init__.py", line 1, in 
from . import models
ModuleNotFoundError: No module named 'apps'

[FAILED] loading examples
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 607, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 399, in 
_check_name_wrapper
  File "", line 823, in load_module
  File "", line 682, in load_module
  File "", line 265, in _load_module_shim
  File "", line 684, in _load
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/root/web3py/apps/examples/__init__.py", line 7, in 
db = DAL('sqlite://test', folder=os.path.join(os.path.dirname(__file__), 
'databases'))
  File "/usr/local/lib/python3.6/dist-packages/pydal/base.py", line 171, in 
__call__
obj = super(MetaDAL, cls).__call__(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pydal/base.py", line 477, in 
__init__
"Failure to connect, tried %d times:\n%s" % (attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pydal/base.py", line 457, in 
__init__
self._adapter = adapter(**kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pydal/adapters/__init__.py", 
line 39, in __call__
obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pydal/adapters/base.py", 
line 369, in __init__
super(SQLAdapter, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pydal/adapters/base.py", 
line 53, in __init__
self.reconnect()
  File "/usr/local/lib/python3.6/dist-packages/pydal/connection.py", line 
154, in reconnect
self.connection = self.connector()
  File "/usr/local/lib/python3.6/dist-packages/pydal/adapters/sqlite.py", 
line 42, in connector
return self.driver.Connection(self.dbpath, **self.driver_args)
sqlite3.OperationalError: unable to open database file

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e31d0b93-d8d2-4933-8d76-cd480abf0237%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-06 Thread Massimo Di Pierro
Thanks. Will fix them both tonight

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/9df3ab66-3233-43a7-a0fd-f5bde2ec48e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-05 Thread 黄祥
test latest commits (146)
*$ make test*
tests/test_auth.py::TestAuth::test_register FAILED
tests/test_auth.py::TestAuth::test_register_invalid FAILED
tests/test_cache.py::CacheTest::test_change_detection PASSED
tests/test_cache.py::CacheTest::test_different_keys PASSED
tests/test_cache.py::CacheTest::test_logic PASSED
tests/test_cache.py::CacheTest::test_memoize_and_expiration PASSED
tests/test_cache.py::CacheTest::test_timing PASSED
tests/test_json.py::TestJson::test_objectify PASSED
tests/test_session.py::TestSession::test_session PASSED
tests/test_session.py::TestSession::test_session_in_db PASSED
tests/test_session.py::TestSession::test_session_in_memcache can't run as 
root without the -u switch
PASSED
tests/test_tags.py::TestTags::test_tags PASSED
tests/test_url.py::TestURL::test_url PASSED

== FAILURES 
===
___ TestAuth.test_register 


self = 

def test_register(self):
body = {
'email': 'pinco.pall...@example.com',
'password': '123456789',
'first_name': 'Pinco',
'last_name': 'Pallino'
}
self.assertEqual(
>   self.auth.action('api/register', 'POST', {}, body),
{
'id': 1,
'status': 'success',
'code': 200}
)

tests/test_auth.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _
web3py/utils/auth.py:139: in action
data = self.register(vars, send=True).as_dict()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _

self = 
fields = {'email': 'pinco.pall...@example.com', 'first_name': 'Pinco', '
last_name': 'Pallino','password': '123456789'}
send = True

def register(self, fields, send=True):
>   fields['username'] = fields['username'].lower()
E   KeyError: 'username'

web3py/utils/auth.py:204: KeyError
___ TestAuth.test_register_invalid 


self = 

def test_register_invalid(self):
body = {'email': 'pinco.pall...@example.com'}
self.assertEqual(
>   self.auth.action('api/register', 'POST', {}, body),
{
'id': None,
'errors': {
'password': 'Too short',
'first_name': 'Enter a value',
'last_name': 'Enter a value'
},
'status': 'error',
'message': 'validation errors',
'code': 401
}
)

tests/test_auth.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _
web3py/utils/auth.py:139: in action
data = self.register(vars, send=True).as_dict()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _

self = 
fields = {'email': 'pinco.pall...@example.com'}, send = True

def register(self, fields, send=True):
>   fields['username'] = fields['username'].lower()
E   KeyError: 'username'

web3py/utils/auth.py:204: KeyError
== warnings summary 
===
web3py/core.py:626
  /root/web3py/web3py/core.py:626: DeprecationWarning: invalid escape 
sequence \d
@bottle.route('/%s/static/_/' 
% app_name)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=== 2 failed, 12 passed, 1 warnings in 5.41 seconds 
===
Makefile:13: recipe for target 'test' failed
make: *** [test] Error 1

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ca38e0af-4e61-4b8c-9a00-8b4049430662%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-05 Thread 黄祥
test another way around to installed web3py, seems can't work smoothly 
using this way pip3 install directly from git repo (which installed 
web3py-start on /usr/local/bin/), another problem is requirements.txt 
package not same like on setup.py install_requires=[...]
*steps*
docker pull ubuntu
docker run -it --privileged ubuntu /bin/bash

apt update
apt install -y git python3-pip
pip3 install git+https://github.com/web2py/web3py --upgrade
cd
git clone https://github.com/web2py/web3py
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('password_admin' )[0] ) )"
web3py-start -p ./password.txt -a 0.0.0.0:8000 ~/web3py/apps

*result*
[FAILED] loading _scaffold
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 607, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 399, in 
_check_name_wrapper
  File "", line 823, in load_module
  File "", line 682, in load_module
  File "", line 265, in _load_module_shim
  File "", line 684, in _load
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/root/web3py/apps/_scaffold/__init__.py", line 2, in 
from . import controllers
  File "/root/web3py/apps/_scaffold/controllers.py", line 30, in 
from . common import db, session, T, cache, auth
  File "/root/web3py/apps/_scaffold/common.py", line 7, in 
from web3py.utils.auth import Auth
ModuleNotFoundError: No module named 'web3py.utils'

[FAILED] loading examples
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 607, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 399, in 
_check_name_wrapper
  File "", line 823, in load_module
  File "", line 682, in load_module
  File "", line 265, in _load_module_shim
  File "", line 684, in _load
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/root/web3py/apps/examples/__init__.py", line 3, in 
from web3py.utils.form import Form
ModuleNotFoundError: No module named 'web3py.utils'

[FAILED] loading myapp
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 607, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 399, in 
_check_name_wrapper
  File "", line 823, in load_module
  File "", line 682, in load_module
  File "", line 265, in _load_module_shim
  File "", line 684, in _load
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/root/web3py/apps/myapp/__init__.py", line 1, in 
from . import models
ModuleNotFoundError: No module named 'apps'

[OK] loaded superheroes
[OK] loaded todo
Bottle v0.12.16 server starting up (using TornadoServer())...
Listening on http://0.0.0.0:8000/
Hit Ctrl-C to quit.

Traceback (most recent call last):
  File "/usr/local/bin/web3py-start", line 11, in 
load_entry_point('web3py==0.1.20190426', 'console_scripts', 
'web3py-start')()
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 713, in 
main
start_server(args)
  File "/usr/local/lib/python3.6/dist-packages/web3py/core.py", line 665, in 
start_server
bottle.run(server='tornado', host=host, port=int(port), reloader=False)
  File "/usr/local/bin/bottle.py", line 3129, in run
server.run(app)
  File "/usr/local/bin/bottle.py", line 2857, in run
import tornado.wsgi, tornado.httpserver, tornado.ioloop
ModuleNotFoundError: No module named 'tornado'

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/71035de1-7747-4c30-82d9-1c82125329c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-03 Thread 黄祥
face same error too on mac python3.7
*steps*
./web3py-start -p password.txt -a 0.0.0.0:8000 apps
cat << EOF >> apps/_scaffold/models.py
db.define_table('thing', Field('name') )
db.commit()
db.define_table('think', Field('name') )
db.commit()
EOF
open http://localhost:8000/_dashboard

error traceback on terminal (appears when 'reload apps' button hit)
[FAILED] loading _scaffold 
Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 614, in 
import_apps
importlib.reload(sys.modules[name])
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/importlib/__init__.py"
, line 169, in reload
_bootstrap._exec(spec, module)
  File "", line 630, in _exec
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/Users/sugizo/learn/python/web3py/apps/_scaffold/common.py", line 37
, in 
groups = Tags(db.auth_user, 'groups')
  File "/Users/sugizo/learn/python/web3py/web3py/utils/tags.py", line 14, in 
__init__
Field('record_id', table))
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
, line 581, in define_table
raise SyntaxError('table already defined: %s' % tablename)
  File "", line None
SyntaxError: table already defined: auth_user_tag_groups

strange things, error traceback above not occured on _dashboard (recent 
tickets), no ticket id shown yet on terminal
after hit 'reload apps' sometimes stuck in gears animation not in previous 
_dashboard content (installed applications, recent tickets, system)

best regards,
stifan

On Monday, June 3, 2019 at 10:16:27 PM UTC+7, John Bannister wrote:
>
> Hi All,
>
> Finally gotten round to playing again on the latest Web3py.
>
> On _scaffold app .. if I add new tables to model file and then reload from 
> the dashboard .. I get errors as follows:-
>
> File "C:\Users\johhb\py3\lib\site-packages\pydal\base.py", line 581, in 
> define_table
> raise SyntaxError('table already defined: %s' % tablename)
>   File "", line None
> SyntaxError: table already defined: auth_user_tag_groups
>
> Only way around it seems to be to delete contents of database folder and 
> restart.
>
> Dashboard app hangs on reload sometimes (I think it has to do the with 
> same issue above) and only way to get round it is to restart the server and 
> refresh the _dashboard app. 
>
> I really want to start using it to create a few new apps I am due to start 
> working on shortly even though I am well aware that it is not yet 
> production ready so will keep testing and assist wherever I can. Thanks 
> again for all the hard work put in so far I am sure its gonna be a really 
> cool solution.
>
> Best Regards
> John
>
>
> On Thursday, 16 May 2019 17:15:44 UTC+2, John Bannister wrote:
>>
>> Hi All,
>>
>> Had a first real 'play' with web3py' today and have a few questions the 
>> biggest of which I am hoping the gurus will be able to answer:-
>>
>> 1: Is there any way to not to have to restart the app every time changes 
>> are made to actions in the controller or new actions added etc? I 
>> understand that controllers are basically being imported when the app fires 
>> up but is any there any way to occasionally reload instead of having to 
>> restart the app? This is a fairly big one for me as sometimes tweaks will 
>> need to be made in production and restarting the web server is not really 
>> an option so hopefully I am missing something really simple.
>>
>> Thanks in advance
>> John
>>
>>
>>
>>
>>
>>
>>   
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/34c36d8c-85d8-4565-a40e-db5fc97ac2e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-03 Thread John Bannister
Hi All,

Finally gotten round to playing again on the latest Web3py.

On _scaffold app .. if I add new tables to model file and then reload from 
the dashboard .. I get errors as follows:-

File "C:\Users\johhb\py3\lib\site-packages\pydal\base.py", line 581, in 
define_table
raise SyntaxError('table already defined: %s' % tablename)
  File "", line None
SyntaxError: table already defined: auth_user_tag_groups

Only way around it seems to be to delete contents of database folder and 
restart.

Dashboard app hangs on reload sometimes (I think it has to do the with same 
issue above) and only way to get round it is to restart the server and 
refresh the _dashboard app. 

I really want to start using it to create a few new apps I am due to start 
working on shortly even though I am well aware that it is not yet 
production ready so will keep testing and assist wherever I can. Thanks 
again for all the hard work put in so far I am sure its gonna be a really 
cool solution.

Best Regards
John


On Thursday, 16 May 2019 17:15:44 UTC+2, John Bannister wrote:
>
> Hi All,
>
> Had a first real 'play' with web3py' today and have a few questions the 
> biggest of which I am hoping the gurus will be able to answer:-
>
> 1: Is there any way to not to have to restart the app every time changes 
> are made to actions in the controller or new actions added etc? I 
> understand that controllers are basically being imported when the app fires 
> up but is any there any way to occasionally reload instead of having to 
> restart the app? This is a fairly big one for me as sometimes tweaks will 
> need to be made in production and restarting the web server is not really 
> an option so hopefully I am missing something really simple.
>
> Thanks in advance
> John
>
>
>
>
>
>
>   
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/bff5857a-e7a8-417e-a973-4f588bb19cdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-02 Thread Massimo Di Pierro


On Saturday, 1 June 2019 20:03:24 UTC-7, 黄祥 wrote:
>
> agree, flexible is no policy, long story short what i mean is, can user 
> define templates on it's own path in the app ?
> *e.g. *
> *apps/_scaffold/settings.py*
> TMPLTS_FOLDER = os.path.join(APP_FOLDER, 'views')
>
>
Instead of @action.uses('template.html') you can do 
@action.uses(Template('template.html'), path=TMPLTS_FOLDER))
Or maybe you can defined your own decorator

use_template = lambda name: action.uses(Template(name, path=TMPLTS_FOLDER))

and uses @use_template('template.html')
 

> btw, no worries, it's fine
>
> test latest commit (142), error traceback about database folders (in 
> terminal), solution :
> mkdir apps/_scaffold/databases
> mkdir apps/examples/databases
>
> seems the web3py_start right now can deal with error traceback, in 
> previous commits, when error traceback occur, the web3py server won't 
> start, perhaps will try to exclude 
> mkdir apps/examples/databases
> in *web3py/docker/Dockerfile *
> and seems *web3py/docker/app* subfolder app is no longer used (can be 
> deleted)
>
> best regards,
> stifan
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/31bd5c2c-0393-49db-9893-4e2b12732c05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-01 Thread 黄祥
agree, flexible is no policy, long story short what i mean is, can user 
define templates on it's own path in the app ?
*e.g. *
*apps/_scaffold/settings.py*
TMPLTS_FOLDER = os.path.join(APP_FOLDER, 'views')

btw, no worries, it's fine

test latest commit (142), error traceback about database folders (in 
terminal), solution :
mkdir apps/_scaffold/databases
mkdir apps/examples/databases

seems the web3py_start right now can deal with error traceback, in previous 
commits, when error traceback occur, the web3py server won't start, perhaps 
will try to exclude 
mkdir apps/examples/databases
in *web3py/docker/Dockerfile *
and seems *web3py/docker/app* subfolder app is no longer used (can be 
deleted)

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f46f0bd8-cc60-43f5-a2a3-09ccbb98ae3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-01 Thread Massimo Di Pierro
You can already has subfolders in the templates folder. When you specify a 
template file, you would specify the path relative to the templates folder.
You could also make a decorator at the app level that automatically finds 
the appropriate template based on the filename and the function name.
But I would leave this to the apps, not make it a policy.



On Saturday, 1 June 2019 08:31:34 UTC-7, 黄祥 wrote:
>
> is it possible to have flexible folders pattern for templates folders ?
> *e.g.*
> mkdir apps/_scaffold/controllers
> mkdir apps/_scaffold/models
> mv apps/_scaffold/controllers.py apps/_scaffold/controllers/default.py
> mv apps/_scaffold/models.py apps/_scaffold/models/db.py
>
> then adjust some file :
> *apps/_scaffold/__init__.py*
> from .controllers import default
> from .models import db
>
> *apps/_scaffold/common.py*
> from .models.db import db
>
> *apps/_scaffold/controllers/default.py*
> from ..common import db, session, T, cache, auth
>
> *apps/_scaffold/models/db.py*
> from .. import settings
>
> like example above the controllers and models is flexible that can be put 
> on root web apps directory as a file (controllers.py and models.py) or 
> under subfolder of webapps (controllers/default.py and models/db.py)
> hopefully it can be implement to templates folders too, because by any 
> chance people want to migrate from web2py to web3py, they can make the 
> folders structure intact, just modify some file to match the module file 
> location, like example above
>
> seen you've hardcoded it on *web3py/core.py* for templates
> path = os.path.join(app_folder, 'templates')
>
> perhaps can define it on web apps base like controllers, models or 
> translations
>
> best regards,
> stifan
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/80a6911e-e608-47b4-8134-fde4e59c7746%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-01 Thread 黄祥
is it possible to have flexible folders pattern for templates and 
translations folders ?
*e.g.*
mkdir apps/_scaffold/controllers
mkdir apps/_scaffold/models
mv apps/_scaffold/controllers.py apps/_scaffold/controllers/default.py
mv apps/_scaffold/models.py apps/_scaffold/models/db.py

then adjust some file :
*apps/_scaffold/__init__.py*
from .controllers import default
from .models import db

*apps/_scaffold/common.py*
from .models.db import db

*apps/_scaffold/controllers/default.py*
from ..common import db, session, T, cache, auth

*apps/_scaffold/models/db.py*
from .. import settings

like example above the controllers and models is flexible that can be put 
on root web apps directory as a file (controllers.py and models.py) or 
under subfolder of webapps (controllers/default.py and models/db.py)
hopefully it can be implement to templates and translations folders too, 
because by any chance people want to migrate from web2py to web3py, they 
can make the folders structure intact, just modify some file to match the 
module file location, like example above

seen you've hardcoded it on *web3py/core.py* for templates, but can't find 
for translations folder
path = os.path.join(app_folder, 'templates')

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d207615e-8c23-476a-be1c-a8ca3c232a58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-30 Thread 黄祥
just clarficiation, is it correct or it should be python3 setup.py sdist
*web3py/Makefile*
deploy: test
python setup.py sdist

*web3py/setup.py*
install_requires=[
...
],
is not same like *web3py/requirements.txt*
perhaps can create a reference that install_requires in web3py/setup.py is 
reference to web3py/requirements.txt, not sure just a suggestion

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/4bb1bedb-c3bd-41b7-8883-8f66f3e83cf1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-30 Thread 黄祥
*Dockerfile*
# please change :
# password.txt with your desire filename
# password_admin with your desire password admin
# 8000 with your available port

FROM ubuntu:latest

RUN apt update && \
 apt install -y git python3-pip python-pip memcached && \
 service memcached restart

RUN groupadd -r web3py && \
 useradd -m -r -g web3py web3py

USER web3py

RUN rm -rf /home/web3py/web3py && \
 cd /home/web3py/ && \
 git clone https://github.com/web2py/web3py && \
 cd web3py && \
 pip3 install pytest mechanize twine && \
 pip3 install -U -r requirements.txt && \
 make test && \
 python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('password_admin' )[0] ) )" && \
 mkdir apps/examples/databases 

WORKDIR /home/web3py/web3py

EXPOSE 8000

CMD ["./web3py-start", "-p", "./password.txt", "-a", "0.0.0.0:8000", 
"./apps"]

*steps to run from Dockerfile (different from prev message)*
cat << EOF > Dockerfile
# please change :
# password.txt with your desire filename
# password_admin with your desire password admin
# 8000 with your available port

FROM ubuntu:latest

RUN apt update && \
 apt install -y git python3-pip python-pip memcached && \
 service memcached restart

RUN groupadd -r web3py && \
 useradd -m -r -g web3py web3py

USER web3py

RUN rm -rf /home/web3py/web3py && \
 cd /home/web3py/ && \
 git clone https://github.com/web2py/web3py && \
 cd web3py && \
 pip3 install pytest mechanize twine && \
 pip3 install -U -r requirements.txt && \
 make test && \
 python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()('password_admin' )[0] ) )" && \
 mkdir apps/examples/databases 

WORKDIR /home/web3py/web3py

EXPOSE 8000

CMD ["./web3py-start", "-p", "./password.txt", "-a", "0.0.0.0:8000", 
"./apps"]

EOF
cat Dockerfile
docker build -t test/ubuntu-web3py .
docker run -d \
 -v apps:/home/web3py/web3py/apps \
 -p 8000:8000 \
 --name ubuntu-web3py \
 test/ubuntu-web3py
docker ps 
docker run -it --privileged test/ubuntu-web3py /bin/bash

submited pr for dockerfile

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e48d9947-2fd9-44ed-8e77-0c090d55f53c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-30 Thread 黄祥
*suggestion for apps/_scaffold:*
*- form validation not work during login and register*
** during register : *
form field password and password (again) allow mismatched input (this case 
happen just in web form field, not in database table, when insert mismatch 
database table remain empty)
** during login : *
form validation not work allow empty email and password, while should be 
appears in web form field, the error traceback written in terminal 
*- better 'explicit than implicit' lesson learned from web2py password :*
* better to have a parameter for developer to set password complexity (min 
input, allow uppercase, numeric, etc) in password form field 
* better explicit the password hash stored in database (sha11, md5, or 
combination among them), it's ok, to have the default, but sometime when 
web2py dev want to continue the project that already have the user table, 
not sure how to face it. 
perhaps if you can have a solution for this, it will be great for web2py n 
web3py

*suggestion general*
- before release please check all the python code with bandit especially in 
web3py/web3py folders (already reported in another thread)

error found during testing _scaffold login
ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 397, in 
wrapper
ret = func(*func_args, **func_kwargs)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 366, in 
wrapper
ret = func(*args, **kwargs)
  File "/Users/sugizo/learn/python/web3py/web3py/utils/auth.py", line 102, 
in responder
return self.action(path, request.method, request.query, request.json)
  File "/Users/sugizo/learn/python/web3py/web3py/utils/auth.py", line 131, 
in action
user, error = self.login(**vars)
TypeError: login() missing 2 required positional arguments: 'email' and 
'password'

id= 1

after successful registered in terminal got :
Mock send to a...@a.com subject "Confirm email" body:
Welcome a, click 
http://localhost:8000/_scaffold/auth/api/verify_email?token=8afa1f35-6af5-4bef-a6d1-7fe87f9beef9
 
to confirm your email

when following the url in browser got :
{
  "code": 401,
  "message": "not authoried",
  "status": "error"
}

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e0e09b08-edf5-4d94-9c1c-5fa42ab4c3cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-30 Thread Massimo Di Pierro
Feel free to submit a PR for docker.
Yes Auth is still in progress but if you have advice, known problems, 
please let us know, Your tests help a lot.

Massimo

On Wednesday, 29 May 2019 18:16:48 UTC-7, 黄祥 wrote:
>
> test so far so good in latest commits (138) using docker (ubuntu n 
> debian), a few error during test auth which i know is still work in 
> progress or prefer to report the error traceback too ?
> *steps*
> docker pull ubuntu
> docker run -it --privileged ubuntu /bin/bash
>
> apt update
> apt install -y git python3-pip python-pip memcached curl unzip 
> service memcached restart
> cd
> git clone https://github.com/web2py/web3py
> cd web3py
> pip3 install pytest mechanize twine 
> pip3 install -U -r requirements.txt
> make deploy
> python3 -c "from pydal.validators import CRYPT; 
> open('password.txt','w').write(str(CRYPT()(input('password:'))[0]))"
> mkdir apps/examples/databases
> ./web3py-start -p password.txt -a 0.0.0.0:8000 apps &
> cd
> curl -L -o ngrok.zip -C - https://
> bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
> unzip ngrok.zip
> cd
> ./ngrok http 8000
>
> best regards,
> stifan
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/45fd61db-1647-4111-a148-f637d55ffabd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-29 Thread 黄祥
test so far so good in latest commits (138) using docker (ubuntu n debian), 
a few error during test auth which i know is still work in progress or 
prefer to report the error traceback too ?
*steps*
docker pull ubuntu
docker run -it --privileged ubuntu /bin/bash

apt update
apt install -y git python3-pip python-pip memcached curl unzip 
service memcached restart
cd
git clone https://github.com/web2py/web3py
cd web3py
pip3 install pytest mechanize twine 
pip3 install -U -r requirements.txt
make deploy
python3 -c "from pydal.validators import CRYPT; 
open('password.txt','w').write(str(CRYPT()(input('password:'))[0]))"
mkdir apps/examples/databases
./web3py-start -p password.txt -a 0.0.0.0:8000 apps &
cd
curl -L -o ngrok.zip -C - https:
//bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok.zip
cd
./ngrok http 8000

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e1ef987c-a503-4237-9945-b7d1e5ef76d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-29 Thread Massimo Di Pierro
fixed. see the readme file

On Tuesday, 28 May 2019 00:41:51 UTC-7, 黄祥 wrote:
>
> *problem*
> can't run it on background because of password required
> *e.g. *
> ./web3py-start apps -a 0.0.0.0: &
>
> perhaps can add parameter for password like web2py during start web3py
> *e.g.*
> python web2py/web2py.py --nogui --no-banner -a a -i 0.0.0.0 -p 8000
>
> test latest commit 128: can register but cannot login (no password stored 
> in auth_user table, wondering where the password stored)
>
> best regards,
> stifan
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/312bc106-80be-4308-b9a0-d61c327bd2a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-28 Thread 黄祥
*problem*
can't run it on background because of password required
*e.g. *
./web3py-start apps -a 0.0.0.0: &

perhaps can add parameter for password like web2py during start web3py
*e.g.*
python web2py/web2py.py --nogui --no-banner -a a -i 0.0.0.0 -p 8000

test latest commit 128: can register but cannot login (no password stored 
in auth_user table, wondering where the password stored)

best regards,
stifan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/21648be2-12b8-4edf-8c7d-d0ca96605678%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-22 Thread 黄祥
tested commit (123), need to create folder databases on examples webapp 
(mkdir apps/examples/databases)
*phase 1 ([FAILED] loading examples)*
rm -rf /tmp/*
rm -rf web3py
git clone https://github.com/web2py/web3py
cd web3py
pip3 install -U -r requirements.txt
$ ./web3py-start apps
 ___      __  __
|  / / / / __ |/___ \/ __ \ \/ /
| | / / /_  / /_/ /___/ / /_/ /\  /
| | /| / / __/ / __  //__  / / / /
| |/ |/ / /___/ /_/ /___/ / / / /
|___/|_/_/_/_/_/ /_/
It is still experimental...
Dashboard is at: http://127.0.0.1:8000/_dashboard
[OK] loaded _dashboard 
[OK] loaded _scaffold 
[FAILED] loading examples 
[OK] loaded myapp 
[OK] loaded superheroes 
[OK] loaded todo

*phase 2 go to http://127.0.0.1:8000/_dashboard via web browser click 
examples an got an error traceback*
Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 571, in 
import_apps
module = importlib.machinery.SourceFileLoader(module_name, init).
load_module()
  File "", line 407, in 
_check_name_wrapper
  File "", line 907, in load_module
  File "", line 732, in load_module
  File "", line 265, in _load_module_shim
  File "", line 696, in _load
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "/Users/sugizo/learn/python/web3py/apps/examples/__init__.py", line 7
, in 
db = DAL('sqlite://test', folder=os.path.join(os.path.dirname(__file__), 
'databases'))
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
, line 171, in __call__
obj = super(MetaDAL, cls).__call__(*args, **kwargs)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
, line 477, in __init__
"Failure to connect, tried %d times:\n%s" % (attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/base.py"
, line 457, in __init__
self._adapter = adapter(**kwargs)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/adapters/__init__.py"
, line 39, in __call__
obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 369, in __init__
super(SQLAdapter, self).__init__(*args, **kwargs)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/adapters/base.py"
, line 53, in __init__
self.reconnect()
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/connection.py"
, line 154, in reconnect
self.connection = self.connector()
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/pydal/adapters/sqlite.py"
, line 42, in connector
return self.driver.Connection(self.dbpath, **self.driver_args)
sqlite3.OperationalError: unable to open database file

*phase 3 check on terminal there is an error*
ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 384, in 
wrapper
ret = func(*func_args, **func_kwargs)
  File "/Users/sugizo/learn/python/web3py/apps/_dashboard/__init__.py", 
line 135, in api
module = Reloader.MODULES[app_name]
KeyError: 'examples'
id= 1

*phase 4 refresh http://127.0.0.1:8000/_dashboard then recent tickets 
appears, now tickets can be deleted*

*there also a strange error traceback*
ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 384, in 
wrapper
ret = func(*func_args, **func_kwargs)
  File "/Users/sugizo/learn/python/web3py/apps/_dashboard/__init__.py", 
line 101, in packed
appname = sanitize(appname)
  File "/Users/sugizo/learn/python/web3py/apps/_dashboard/utils.py", line 94
, in sanitize
return re.sub('\W', '', re.sub('[\w-/.]+','_',name))
  File "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/re.py", 
line 192, in sub
return _compile(pattern, flags).sub(repl, string, count)
  File "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/re.py", 
line 286, in _compile
p = sre_compile.compile(pattern, flags)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/sre_compile.py", 
line 764, in compile
p = sre_parse.parse(p, flags)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/sre_parse.py", 
line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/sre_parse.py", 
line 426, in _parse_sub
not nested and not items))
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/sre_parse.py", 
line 575, in _parse
raise source.error(msg, len(this) + 1 + len(that))
re.error: bad character range \w-/ at position 1

best 

[web2py] Re: Web3py

2019-05-21 Thread Massimo Di Pierro
delete everything in /tmp/web3py and restart it. This folder should really 
be created in the cwd not in /tmp/ I will change it.

On Monday, 20 May 2019 07:17:14 UTC-7, En Ware wrote:
>
> Getting error missing table , sqlite3.OperationalError: no such table: 
> web3py_error
>
> _dashboard won't load at all. 
>
> On Wednesday, May 15, 2019 at 9:51:40 AM UTC-5, En Ware wrote:
>>
>> Thank you very much for the explanation , it really helps. 
>>
>> On Wednesday, May 15, 2019 at 12:23:47 AM UTC-5, Massimo Di Pierro wrote:
>>>
>>> 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, response, abort, and redirect (but 
>>> has its own decorator instead the bottle one)
>>> [100%] has its own new session object (support cookies, db, memcache, 
>>> redis, and user defined)
>>> [100%] has its own O(1) least recently used cache/memoize function (used 
>>> for example to cache templates in ram)
>>> [100%] web3py/form.py replaces SQLFORM
>>>
>>> [75%]  "_dashboard" instead of "admin" (same purpose)
>>> [75%] "_dashboard dbadmin" instad of appadmin (same purpose)
>>> [75%] "_scaffold" instead of welcome (same purpose)
>>> [75%] applications/_dashboard/components/mtable.* replaces 
>>> SQLFORM.smartgrid 
>>> [50%] applications/_scaffold/components/auth.*  + web3py/utils/auth.py 
>>> replace Auth + user.html
>>>
>>> It uses the concept of "Fixtures" which are like bottle plugins but can 
>>> have dependencies. DAL, Session, T, templates are fixtures. 
>>>
>>> For every action they must be declared as in:
>>>
>>> @action('index', method=['GET','POST'])
>>> @action.uses('my-template.html', mysession, T , mydb)
>>> def index():
>>>   return dict()
>>>
>>> It is important to declare them to avoid a shortcoming of web2py and 
>>> other frameworks, to avoid doing work when it is not necessary. So if an 
>>> action does not need session, there is no need to even try parse cookies, 
>>> hence you do not declare the fixture. 
>>>
>>> You can define aliases:
>>>
>>> myaction = action.uses('my-template.html', mysession, T , mydb)
>>>
>>> and then do
>>>
>>> @action('index', method=['GET','POST'])
>>> @myaction
>>> def index():
>>>   return dict()
>>>
>>> Unlike web2py the models.py, controllers.py and all the other files are 
>>> just regular files. You can call them what you like, and they are imported, 
>>> not executed. This means web3py is much faster and also you can use pylint 
>>> and code completion without tweaks. No custom_importer that can cause weird 
>>> behavior. This also means there will be some nu-expected behavior for 
>>> web2py users and needs to be documented. Every module in the applications 
>>> folder is an app. Apps does not need to expose any action, they can just be 
>>> a collection of modules, or static files, or templates. 
>>>
>>> _dashboard and _scaffold use vue.js and the grid (mtable) and auth are 
>>> vue component but you can use them even if the rest of your app does not 
>>> use vue. Components have their own html templates in vue and they can 
>>> easily be customized for different CSS. This requires a much longer 
>>> explanation and I will write it when it is finalized.
>>>
>>> We ditched the web2py Storage object. People like it but the profiler 
>>> showed Storage.__getitem__ is the single most called function in web2py and 
>>> causes loss in performance. In web3py we stick to regular python dict 
>>> objects.
>>>
>>> This is work in progress so things will change.
>>>
>>> Massimo
>>>
>>>
>>>
>>>
>>> On Tuesday, 14 May 2019 08:42:16 UTC-7, En Ware wrote:

 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 was looking up information on how "dict" was formed.

 On Tuesday, May 14, 2019 at 9:20:00 AM UTC-5, En Ware wrote:
>
> 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 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 web3py
>>> pip3 install -r requirements.txt
>>> mkdir applications/_dashboard/translations
>>> mkdir applications/_scaffold/databases
>>> mkdir applications/toys/databases

[web2py] Re: Web3py

2019-05-21 Thread En Ware
That was it thanks. 

On Tuesday, May 21, 2019 at 10:05:56 AM UTC-5, Massimo Di Pierro wrote:
>
> There should be web3py folder in /tmp delete it and restart

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/9d0d7233-8c2b-4d87-888b-63e61dc417c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-21 Thread Massimo Di Pierro
There should be web3py folder in /tmp delete it and restart

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8de87389-2123-4a1e-9b2b-0db03bbd08a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-21 Thread En Ware
./web3py-start apps/

 ___      __  __
|  / / / / __ |/___ \/ __ \ \/ /
| | / / /_  / /_/ /___/ / /_/ /\  /
| | /| / / __/ / __  //__  / / / /
| |/ |/ / /___/ /_/ /___/ / / / /
|___/|_/_/_/_/_/ /_/
It is still experimental...

Dashboard is at: http://127.0.0.1:8000/_dashboard
[OK] loaded _dashboard 
[OK] loaded myapp 
[OK] loaded todo 
[OK] loaded superheroes 
[OK] loaded examples 
[OK] loaded _scaffold 
Bottle v0.12.16 server starting up (using TornadoServer())...
Listening on http://127.0.0.1:8000/
Hit Ctrl-C to quit.

WARNING:tornado.access:404 GET / (127.0.0.1) 1.66ms
WARNING:tornado.access:404 GET /favicon.ico (127.0.0.1) 1.11ms
ERROR:root:Traceback (most recent call last):
  File 
"/Users/aaronm/.pyenv/versions/3.6.4/envs/web3py/web3py/web3py/core.py", 
line 384, in wrapper
ret = func(*func_args, **func_kwargs)
  File 
"/Users/aaronm/.pyenv/versions/3.6.4/envs/web3py/web3py/apps/_dashboard/__init__.py",
 
line 116, in tickets
tickets = error_storage.get()
  File 
"/Users/aaronm/.pyenv/versions/3.6.4/envs/web3py/web3py/web3py/core.py", 
line 535, in get
list_rows = db(query).select(*fields, orderby=orderby, 
groupby=groupby).as_list()
  File 
"/Users/aaronm/.pyenv/versions/web3py/lib/python3.6/site-packages/pydal/objects.py",
 
line 2395, in select
return adapter.select(self.query, fields, attributes)
  File 
"/Users/aaronm/.pyenv/versions/web3py/lib/python3.6/site-packages/pydal/adapters/sqlite.py",
 
line 82, in select
return super(SQLite, self).select(query, fields, attributes)
  File 
"/Users/aaronm/.pyenv/versions/web3py/lib/python3.6/site-packages/pydal/adapters/base.py",
 
line 763, in select
return self._select_aux(sql, fields, attributes, colnames)
  File 
"/Users/aaronm/.pyenv/versions/web3py/lib/python3.6/site-packages/pydal/adapters/base.py",
 
line 719, in _select_aux
rows = self._select_aux_execute(sql)
  File 
"/Users/aaronm/.pyenv/versions/web3py/lib/python3.6/site-packages/pydal/adapters/base.py",
 
line 713, in _select_aux_execute
self.execute(sql)
  File 
"/Users/aaronm/.pyenv/versions/web3py/lib/python3.6/site-packages/pydal/adapters/__init__.py",
 
line 67, in wrap
return f(*args, **kwargs)
  File 
"/Users/aaronm/.pyenv/versions/web3py/lib/python3.6/site-packages/pydal/adapters/base.py",
 
line 413, in execute
rv = self.cursor.execute(command, *args[1:], **kwargs)
sqlite3.OperationalError: no such table: web3py_error

WARNING:tornado.access:404 GET /todo/static/favicon.ico (127.0.0.1) 1.46ms
WARNING:tornado.access:404 GET /myapp/static/favicon.ico (127.0.0.1) 1.27ms
WARNING:tornado.access:404 GET /_scaffold/static/favicon.ico (127.0.0.1) 
1.48ms
WARNING:tornado.access:404 GET /superheroes/static/favicon.ico (127.0.0.1) 
1.24ms
WARNING:tornado.access:404 GET /examples/static/favicon.ico (127.0.0.1) 
1.43ms

On Tuesday, May 21, 2019 at 9:33:27 AM UTC-5, En Ware wrote:
>
> The only thing I did was:
>
> 1. git pull 
> 2. ./web3py-start apps/
>
> Thats all I did. 
>
> On Monday, May 20, 2019 at 3:08:26 PM UTC-5, 黄祥 wrote:
>>
>> Getting error missing table , sqlite3.OperationalError: no such table: 
>>> web3py_error
>>>
>>> _dashboard won't load at all. 
>>>
>>
>> could you please tell us steps to reproduce that error or show some code ?
>>
>> best regards,
>> stifan 
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/024fb3b5-683d-4d3e-aa02-393a6fc60f35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-21 Thread En Ware
The only thing I did was:

1. git pull 
2. ./web3py-start apps/

Thats all I did. 

On Monday, May 20, 2019 at 3:08:26 PM UTC-5, 黄祥 wrote:
>
> Getting error missing table , sqlite3.OperationalError: no such table: 
>> web3py_error
>>
>> _dashboard won't load at all. 
>>
>
> could you please tell us steps to reproduce that error or show some code ?
>
> best regards,
> stifan 
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/c95bb540-d81a-484e-ac10-6bb9f60bfae8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py Auth

2019-05-21 Thread villas
Many2many: I think a generic tagging api is a great idea in general for 
web3py.  If we can leverage that for auth groups too,  then why not.  
Clearly a link table adds complexity to all the queries, but if this is 
properly serviced by the api, then no prob.

Hierachical tagging,  nested sets always seem to be a real pain point for 
SQL unless recursive CTEs used.  But then things start getting a little 
tricky as the existing DAL doesn't do that (yet?).  There is still one easy 
option available though:  materialised path.  I think this is a great idea 
because the queries are super-simple and could easily be implemented for 
all sorts of hierarchical data structures.

The above options would be more than I suggested for auth groups, but would 
both enhance the feature-set of web3py and find lots of applications.

Thanks for thinking about these possibilities!



On Tuesday, 21 May 2019 04:31:06 UTC+1, Massimo Di Pierro wrote:
>
> I am thinking for something. I am thinking of a generic tagging api which 
> wold allow you to tag any object using efficient many2many and use 
> hierarchical tags.
> You would be able to tag users with group tags and efficiently search 
> groups for users and users by group. I have a prototype but it will not go 
> into the auth.py module.
> would that be ok?
>
>
> On Monday, 20 May 2019 08:35:21 UTC-7, villas wrote:
>>
>> Hi Massimo
>> Thanks for the auth implementation.  However, I personally think Groups 
>> are an essential feature of any auth.
>>
>> As a suggestion, could you please consider at least a slimmed-down 
>> version of Groups.  I am thinking simply this:
>>
>>- Extra field:  auth_user.group_ids list:reference
>>- Table:  auth_group,  (id, name)
>>- Function:  is_user_in_groups(user=auth.user, groups=[], all=True) 
>>   - if all==False* then 'any'* 
>>   - groups could be list of ids or names   
>>   
>> Many thanks for your consideration!  D
>>
>>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/6e548bc2-7b9d-4840-b015-e1084ec4b2ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   >