You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the page title in index.html or the favicon does not get reflected when the app is run.
Environment
Python version: Python 3.8.3
Flask version: Version: 1.1.2
Werkzeug version: Version: 1.0.1
I've made the following script in order to try to both kill the server and delete any .pyc caching that might be causing the problem. For Windows only:
kill_server.py:
importosimportsubprocessimportreport=5000host='127.0.0.1'cmd_newlines=r'\r\n'host_port=host+':'+str(port)
pid_regex=re.compile(r'[0-9]+$')
netstat=subprocess.run(['netstat', '-n', '-a', '-o'], stdout=subprocess.PIPE)
# Doesn't return correct PID info without precisely these flagsnetstat=str(netstat)
lines=netstat.split(cmd_newlines)
forlineinlines:
ifhost_portinline:
pid=pid_regex.findall(line)
ifpid:
pid=pid[0]
os.system('taskkill /F /PID '+str(pid))
# And finally delete the .pyc cacheos.system('del /S *.pyc')
The problem remains dispite manually doing the above taskkills and deleting .pyc files by hand or running kill_server.py. Therefore, there's something going on in Flask that is causing the old app to be run (it's cached or something...)
Please help! I really want to make a calculator in Flask, not CherryPy.
I've tried "Clear Browsing Data > Clear Images & Files / Cookies" in Chrome, on Windows 10. Same issue.
The text was updated successfully, but these errors were encountered:
Okay, maybe clear browsing data did work, because it's showing the new favicon now. But it didn't work immediately after doing that. Anyhow... thanks for any advice you have.
Expected Behavior
For updates of the code including favicon and index.html to be shown when I hit run in my IDE again (Wingware, but same problem at command line).
# Minimal example is any Flask app
Actual Behavior
Running the app renders the same app I first ran today, namely:
https://github.com/helloflask/calculator
Changing the page title in index.html or the favicon does not get reflected when the app is run.
Environment
I've made the following script in order to try to both kill the server and delete any .pyc caching that might be causing the problem. For Windows only:
kill_server.py:
The problem remains dispite manually doing the above taskkills and deleting .pyc files by hand or running kill_server.py. Therefore, there's something going on in Flask that is causing the old app to be run (it's cached or something...)
Please help! I really want to make a calculator in Flask, not CherryPy.
I've tried "Clear Browsing Data > Clear Images & Files / Cookies" in Chrome, on Windows 10. Same issue.
The text was updated successfully, but these errors were encountered: