Reputation: 561
I executed runserver to test Django Framework but it appears a message " Not Found: /
". When I try the page localhost:8000
it works fine, but the message is still there. Any idea?
P.S. I tried localhost:8000/admin
and the message does not appear.
Urls.py
from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
Upvotes: 1
Views: 3198
Reputation: 4511
This happens simply because you didn't define any pattern in urls.py
that matches /
and you have some views that matches admin/
.
If you want to show something in http://127.0.0.1:8000/
you will need to create a view first and add it to urls.py
like
`url(r'^$', 'myview', name='myview'),``
I recommend you to follow the Django tutorial
Upvotes: 3