Cannot Access Site on "Polls" part of tutorial part 1

Firstly, I apologize as I know this portion of the tutorial has been asked about many times. I am only asking as I have not been able to find a solution that works for me.

I am on the first part of the “Getting Started Tutorial” but I am unable to access the polls index or the admin page.

I have triple checked that my “urls.py” files are in the correct place.

/mysite/mysite/urls.py

and

/mysite/polls/urls.py

respectively.

I have also checked that there are no other urls.py in the directory. Only “mysite” “polls” “db.sqlite3” and “manage.py” are in my “mysite” root directory.
image

When using the server, I restart the server every time I make changes. I have checked both

http://127.0.0.1:8000/polls/
and
http://127.0.0.1:8000/admin/

Each of these links gives me a “Can’t reach this page: 127.0.0.1 refused to connect”
image

I also checked using just the http://127.0.0.1:8000/ adress, which gave me an expected 404 error, and showed both “admin/” and “polls/” listed as searched for URLs.
image

From my looking through forums, I found someone who had the exact issue as myself, with the same setup, however for them, adding “polls/” to the end of their URL took them to the correct destination, but for me it does not. I am at a loss as to what I am doing wrong at this point. I’ll include the code I am using below. Please let me know if there is any more info you need from me regarding what I am doing. If it matters, I am doing this in a Github codespace, rather than locally.

mysite/mysite/urls.py

from django.contrib import admin
from django.urls import include, path

urlpatterns = [
    path("polls/", include("polls.urls")),
    path("admin/", admin.site.urls),
]

mysite/polls/urls.py

from django.urls import path


from . import views


urlpatterns = [
    path("", views.index, name="index")
 ]

mysite/polls/views.py

from django.http import HttpResponse


def index(request):
    return HttpResponse("Hello, world. You're at the polls index.")

Please show the complete output from the console where you’re running runserver - starting from the command line to showing the output from what you’re trying here.

Thanks for the quick reply. Here is the output.

@HenrySmalstig ➜ /workspaces/My_Grid/Digital_Planner/mysite (Projects) $ python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
February 28, 2024 - 19:10:03
Django version 5.0.1, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

I’m not recognizing the prompt you’re showing here.

Are you running this all on your local system, or are you accessing a remote system to do this?

Remote System. I’m using a Github Codespace to work on this currently. If that is the issue it would make sense. I applied the migrations that it was prompting me for and it did not fix the issue, however the console longer flags anything when I use “runserver”

If “github codespace” is something on a machine that is not yours, yes, that’s the problem. Your browser on your system would not see that system as 127.0.0.1 (localhost).

The entire tutorial is designed around you doing this on your development system. You’re likely going to encounter a number of different issues trying to do this remotely.

Gotcha, thanks. I had been thinking it might work since when I launched the “localhost” site initially in the early steps of the tutorial, I was greeted with the django Rocketship that says congratulations, but it would make sense that it would require a local machine considering what I am doing. I appreciate it! Will switch to local and move forward from there. Thank you very much for your time.