[SOLVED] Update changes on Web Forms

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:

  1. I cannot seem to setup Development mode. I asked here but I got no answer ( Translation Strings Status )

  2. I tried to switch from Production to Develop based on this ( Developer mode and production mode - #3 by Jasmine ) . I can execute bench start but I cannot access the web on port 80, 8080 nor 8000

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 again sudo service nginx stop and sudo /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. :stuck_out_tongue:

I have updated my question with the correct answer ONLY for 2nd point.