Hi Massimo,
I have downloaded latest web3py and same thing is happening. I can see in the
console that it is reloading all the apps but for me updates are not happening
until I restart the server.
I am running web3py in a python3 venv on windows/linux (Ubuntu 18) python 3.6.
Myapp/controller.py
from web3py import action, request, redirect, abort
from . models import db
@action('helloworld') # exposes http://127.0.0.1:8000/myapp/helloworld
@action.uses(db, 'helloworld.html')
def helloworld(): return dict(name=request.forms.get('name', 'visitor'))
@action('helloworld1') # exposes http://127.0.0.1:8000/myapp/helloworld1
@action.uses(db, 'helloworld.html')
def helloworld1(): return dict(name=' 1 '+ request.forms.get('name', 'visitor'))
@action('helloworld2') # exposes http://127.0.0.1:8000/myapp/helloworld2
@action.uses(db, 'helloworld.html')
def helloworld2(): return dict(name=' 2 ' +request.forms.get('name', 'visitor'))
@action('helloworld3') # exposes http://127.0.0.1:8000/myapp/helloworld3
@action.uses(db, 'helloworld.html')
def helloworld3(): return dict(name=' 3 ' + request.forms.get('name',
'visitor'))
After reload apps only helloworld accessible. After server restart all are.
BR
John
From: [email protected] [mailto:[email protected]] On Behalf Of
Massimo Di Pierro
Sent: 17 May 2019 17:12
To: web2py-users
Subject: Re: [web2py] Re: Web3py
I fixed the database locking problem. missing db.commit()
Editing apps and reloading forks for me. Please try again and let's try figure
out why does not work for you.
It is intentionally reloading all apps but this can easily be changed. I will
change it.
Massimo
On Friday, 17 May 2019 02:10:27 UTC-7, John Bannister wrote:
Hi Massimo,
I have tried that but it has no effect. It seems to be doing something for a
while but the only way I can get changes to appear is to restart the server.
Basically what I did was to copy and rename the helloworld action a few times
so helloworld1 …….helloworld7 (all in same controller.py) giving appropriate
return messages.
If I reload using the dashboard button I still only see helloworld (the rest
give me 404 errors) but if I restart the server I can access myapp/helloworld1
to myapp/helloworld7.
Also it seems that the reload apps button is reloading all the apps in the
applications directory. Is this intentional or is there a way to just reload
the app currently being developed?
BR
John
From: [email protected] [mailto:[email protected]] On Behalf Of
Massimo Di Pierro
Sent: 17 May 2019 09:36
To: web2py-users
Subject: [web2py] Re: Web3py
yes. There is a button on the top/right of the dashboard "reload apps"
On Thursday, 16 May 2019 08:15:44 UTC-7, 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/c33707df-ec41-4574-a6a6-54c2905ff10e%40googlegroups.com
<https://groups.google.com/d/msgid/web2py/c33707df-ec41-4574-a6a6-54c2905ff10e%40googlegroups.com?utm_medium=email&utm_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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/84b51eaa-209e-45fa-88a3-d4f986f7a441%40googlegroups.com
<https://groups.google.com/d/msgid/web2py/84b51eaa-209e-45fa-88a3-d4f986f7a441%40googlegroups.com?utm_medium=email&utm_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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/003701d50ccd%242390f870%246ab2e950%24%40gmail.com.
For more options, visit https://groups.google.com/d/optout.