🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

Multipage apps and hot reloading

Hi,

I have created a multipage apps. I have an index.py that is actually redirecting to the other apps. I would like to use the functionality of hot reloading when I change some of the other apps but they do not get reloaded.
Is it possible to do hot reloading and multipage apps?
Thanks,

oriol

Do you set debug=True when calling app.runserver?

Yes, of course. But the app.runserver is in the file index.py and this file is only used to redirect to other apps like specified here:
https://dash.plot.ly/urls

Thanks,

oriol

It definitely works. I made a repl.it to confirm https://repl.it/@StephenTierney/KaleidoscopicSugarySoftware

Could you tell me how you test it? I have visited the repl.it that you have created. I started it and then I went to https://kaleidoscopicsugarysoftware–stephentierney.repl.co/apps/app1 The page is shown fine. Then I change the app1.py file and I saved it. But the page is not reloaded and it doesn’t show my changes. So if you tested it and it works fine I might be doing something wrong.
Thanks,

oriol

Ok, I managed to test it and it works fine as you said when it doesn’t go through an apache server. But in my case, I have to deploy it through an apache server as this issue explains:

Do you know why the hot reloading is not working in this case and possible solutions?
Thanks

oriol

Ok so the hot reloading you have experienced is due to the development server that is run when you use app.run_server(debug=True). Therefore this is not related to multi-page apps.

Now you are using Apache and mod_wsgi, which is a different web server.

The documentation of mod_wsgi has detailed information on this topic https://modwsgi.readthedocs.io/en/develop/user-guides/reloading-source-code.html

Thank you very much. The link was very useful.