Forums

Do changes to template files still appear without a reload?

From previous experience with this platform, I understand that changes to PY files require the website to be reloaded with the green button in the Web tab. However, I thought changes to template files would auto update without having to click that button. I am not seeing that happening with my latest project.

Maybe my definition of template file is incorrect.

So a clearer question: If I make changes to a .html files stored in the /templates directory, will the system pick it up without a reload? It does not seem to be working for me.

In some versions of some frameworks, templates are loaded every time they are accessed. In others they are loaded when the app starts. In the first case, you do not need to reload your web app to see the changes. In the second, you do.

Sorry, forgot to mention I am using Flask v 1.1.1.

I don't know what that particular version of Flask does, and it may also have something to do with your settings, so the basic test, is: If the templates update when you edit them, then you don't need a reload.

How do you get the templates to update without having to reload?

Found the answer here