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 “” files are in the correct place.





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

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

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

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

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.


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

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


from django.urls import path

from . import views

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


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 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 migrate' to apply them.
February 28, 2024 - 19:10:03
Django version 5.0.1, using settings 'mysite.settings'
Starting development server at
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 (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.