Is there any way to automatically update changes on Web Forms? (Production mode)
For example, I creates a file test.html and test.py in www folder.
On .py file I wrote this code
def get_context(context):
context.tt = 'dsad'
Now if I want to change the tt variable and reflect changes on HTML I need to execute bench restart every time.
Reason why I am asking:
-
I cannot seem to setup Development mode. I asked here but I got no answer ( Translation Strings Status )
-
I tried to switch from Production to Develop based on this ( Developer mode and production mode - #3 by Jasmine ) . I can execute
bench startbut I cannot access the web on port80,8080nor8000
EDIT: As per 2nd point when I execute curl localhost:8000 on VM it executes successfully. But on my browser I cannot reach it. No, I did not change any configurations on VM.
EDIT2: For the 2nd point. On VM, you need to follow these steps.
- Close VM.
- Right click on VM. Settings → Network.
- Click on
Advanced→ Port Forwarding and add these configs: - Name:
vm_http2/ Protocol:TCP/ Host Ip: (Leave it blank) / Host Port:8000/ Guest Ip: (Leave blank) / Guest Port:8000. - Click Ok.
Close everything and Run VM. Do not forget to run againsudo service nginx stopandsudo /etc/init.d/supervisor stop
And this is how I was able to setup Dev Image in 2 in the morning. Have a good night because in 5 hours I have to wake up and go to work. ![]()