PythonAnywhere Forums

Django runserver on pythonanywhere?


Can I run Django's runserver on Pythonanywhere somehow?

From Bash console, I started it with python runserver But I cannot access it at

My intention is to use PythonAnywhere to serve me as development server as well as production sever.

I'd like to use pdb to debug view functions interactively after it was called for POST. I am using logging to get message displayed in error log. But I miss interactivity of pdb. " shell" gives me interactivity for debugging models but not views with request context.

Googling around, it looks it is difficult to get console access for WSGI app...

So I would like to use django's runserver.

(Would SSH port forwarding make this work?)

SSH port forwarding might work, yes. Be aware that the ports on PythonAnywhere are effectively public, so anyone can snoop on what you're doing. But, assuming that doesn't matter, then you could try using SSH port forwarding. Something like this:

ssh -L 8002:localhost:8001

Would set up port 8002 on your machine to be hooked up to port 8001 on PA. I think.

SSH port forwarding works! Thank you, harry!

what 's the password in here

your SSH password is the same as your normal account password, but SSH is a paid feature I'm afraid...