[Answered ]-Page 404 error after running Django server

1👍

Look at your urlpatterns:

urlpatterns = [
    path('admin/', admin.site.urls),
    path('home', views.home),
]

You haven’t set the path for real "home" page, which should be "". Change it to:

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.home),
]

And you will be fine. The first argument in parenthesis is real "value" that you need to provide just after the domain (http://localhost:8000/ with local service).

Leave a comment