# The "poll" app in the tutorial "getting started": Page not found (404)

**URL:** <https://forum.djangoproject.com/t/the-poll-app-in-the-tutorial-getting-started-page-not-found-404/26027>\
**Category:** Getting Started\
**Created:** [December 9, 2023, 11:51am UTC](https://forum.djangoproject.com/t/the-poll-app-in-the-tutorial-getting-started-page-not-found-404/26027 "2023-12-09T11:51:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danceswithdolphin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/danceswithdolphin/32/17674_2.png) [@danceswithdolphin](https://forum.djangoproject.com/u/danceswithdolphin)\
**Post date:** [December 9, 2023, 11:51am UTC](https://forum.djangoproject.com/t/the-poll-app-in-the-tutorial-getting-started-page-not-found-404/26027/1 "2023-12-09T11:51:11Z")

</div>

How could I go wrong so soon. On the first tutorial !

---

<div class="post-metadata">

**Author:** ![leandrodesouzadev](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/leandrodesouzadev/32/8981_2.png) [@leandrodesouzadev](https://forum.djangoproject.com/u/leandrodesouzadev)\
**Post date:** [December 9, 2023, 12:01pm UTC](https://forum.djangoproject.com/t/the-poll-app-in-the-tutorial-getting-started-page-not-found-404/26027/2 "2023-12-09T12:01:43Z")

</div>

Hey there, if you’re seeking for help you need to provide the details of your current project in order for others to be able to help you. In this type of case, generally we need to see:

- `urls.py`: the one inside your `polls` app/folder;
- `views.py`: the one inside your `polls` app/folder;
- `urls.py`: the “root” one, located in the same directory of the `wsgi.py` and `settings.py` files.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [December 9, 2023, 2:51pm UTC](https://forum.djangoproject.com/t/the-poll-app-in-the-tutorial-getting-started-page-not-found-404/26027/3 "2023-12-09T14:51:08Z")

</div>

In addition to the items above, you also need to specify what step you are on (which section of which page) and the URL that you are trying to access.

---

<div class="post-metadata">

**Author:** ![danceswithdolphin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/danceswithdolphin/32/17674_2.png) [@danceswithdolphin](https://forum.djangoproject.com/u/danceswithdolphin)\
**Post date:** [December 13, 2023, 2:39am UTC](https://forum.djangoproject.com/t/the-poll-app-in-the-tutorial-getting-started-page-not-found-404/26027/4 "2023-12-13T02:39:58Z")

</div>

```auto
from django.http import HttpResponse

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

```

← anything\polls\urls.py →

```auto
from django.urls import path

from . import views

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

```

← anything\mysite\urls.py →

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

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

```

# Page not found (404)

| Request Method: | GET |
| --- | --- |
| Request URL: | [http://localhost:8000/](http://localhost:8000/) |

Using the URLconf defined in `mysite.urls`, Django tried these URL patterns, in this order:

1. polls/
2. admin/

The empty path didn’t match any of these.

You’re seeing this error because you have `DEBUG = True` in your Django settings file. Change that to `False`, and Django will display a standard 404 page

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [December 13, 2023, 2:42am UTC](https://forum.djangoproject.com/t/the-poll-app-in-the-tutorial-getting-started-page-not-found-404/26027/5 "2023-12-13T02:42:33Z")

</div>

This **exact** situation was discussed at [Page not found (404) Include not working](https://forum.djangoproject.com/t/page-not-found-404-include-not-working/23923). In particular, see [Page not found (404) Include not working - #7 by KenWhitesell](https://forum.djangoproject.com/t/page-not-found-404-include-not-working/23923/7)

Side Note: When posting code or templates here, surround the code (or template) between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep the text properly formatted.  
(I’ve taken the liberty of fixing your original post for this.)

---

<div class="post-metadata">

**Author:** ![danceswithdolphin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/danceswithdolphin/32/17674_2.png) [@danceswithdolphin](https://forum.djangoproject.com/u/danceswithdolphin)\
**Post date:** [December 13, 2023, 2:52am UTC](https://forum.djangoproject.com/t/the-poll-app-in-the-tutorial-getting-started-page-not-found-404/26027/6 "2023-12-13T02:52:03Z")

</div>

# Writing your first Django app, part 1

(venv) PS C:\Users\joe\anything\> python manage.py runserver

Never mind it works if I:  
[http://localhost:8000/polls/](http://localhost:8000/polls/)
