Chris Tope
Chris Tope

Reputation: 133

Django Project App Urls Page Not Found (404)

I still new to Django and I'm following this tutorial in YouTube. I can't proceed to the next tutorial because I hit an error.

When I type http://127.0.0.1:8000/music. I get this error. enter image description here

Check my code below:

mysite urls.py

from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^music/', include('music.urls')),
]

music urls.py

from django.conf.urls import url
from . import views

urlpatterns = [
    url(r'^$', views.index, name='index'),
]

music views.py

from django.http import HttpResponse

def index(request):
    return HttpResponse("<h1>Hello World</h1>")

Please help.

Upvotes: 0

Views: 372

Answers (1)

Wei Huang
Wei Huang

Reputation: 46

You might have not saved the project/urls.py file.

Or to check whether the music is set in INSTALLED_APPS in settings.py?

Upvotes: 3

Related Questions