Forums

How does it know which app to run in username.pythonanywhere.com?

I more or less inadvertently have two files in the mysite directory - one named flask_app.py and other oldflask_app.py and I'm wondering how it's determined which runs on a request for username.pythonanywhere.com? They both have @app.route('/'... in them.

I can test it and see that it runs flask_app.py, but I was wondering how it chooses and can't find any configuration file that tells it what to look for.

read through you wsgi.py and you will see that it imports a particular app (application is what will be run for your webapp)

Thank you.