Search code examples
serverlocalhosthostingpythonanywhere

What happens when running Django server on pythonenywhere.com?


As pythonanywhere is the one of best place to host python web app. And apps will be hosted as per wsgi.py configurations on it's own server. But what happens when I do something like this on its bash shell?

$ python manage.py runserver 127.0.0.1:9000

Performing system checks...
System check identified no issues (0 silenced).
April 28, 2016 - 15:29:48
Django version 1.9.5, using settings 'MyProject.settings'
Starting development server at http://127.0.0.1:9000/
Quit the server with CONTROL-C.

As you can see I had changed the port to :9000, so is there any way to access this or it's just meaningless as it's serving the app on served server service?


Solution

  • PythonAnywhere dev here. There's no way to access a server you run using manage.py runserver. It will try to bind to a local port, but that port isn't visible from outside the PythonAnywhere cluster.

    [edit] Oh, and thank you for the kind words about PythonAnywhere!