Skip to content Skip to sidebar Skip to footer

Django Site Cant Be Reached

I run the server in c9 (django workspace). There were no errors and it said Starting development server at http://127.0.0.1:8000//. However, when i open this site it says This

Solution 1:

127.0.0.1 is your local computer, not the c9 instance. The docs refer to a unique URL for each app, like: http://<workspacename>-<username>.c9users.io:8081

So, try using runserver like this: python manage.py runserver $IP:$PORT

You can then look in your browser tab for the server address that you can see your app running on, which will be similar to the one above. You'll use that when testing instead of localhost or 127.0.0.1.

Check out the Django guide on their site for more details.

Solution 2:

In the documentation says that you use a URL they give to you (not localhost) to access the server

Use the Share button on the top to figure out the URLs of running Application and the Preview.

See https://docs.c9.io/docs/run-an-application#section--pre-view-your-application

Post a Comment for "Django Site Cant Be Reached"