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

73 views
Skip to first unread message

Tanveer

unread,
Apr 4, 2023, 12:44:38 PM4/4/23
to Django users
0

I know this question has been asked before, but I haven't found an answer that solves my situation.

I'm looking at the Django tutorial, and I've set up the first URLs exactly as the tutorial has it, word for word, but when I go to http://127.0.0.1:8000/, it gives me this error: but when i go to http://127.0.0.1:8000/admin/ its working fine,where and what i am doing wrong? i am using python version 3.11.1 please let me know for any other info

urls.py

from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
from .views import home
urlpatterns = [
                path('admin/', admin.site.urls),
                path('', home)
              ]

views.py
from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
def home(request):
    return render(request,home.html,{})

Screenshot 2023-04-04 054103.png

Michael Starr

unread,
Apr 11, 2023, 8:44:53 AM4/11/23
to Django users
You probably weren't careful enough following instructions. The beginner's tutorial is self-contained and allows a complete Django project to be made. Re-read everything word-for-word and then come back with some hypotheses for us to test for you.
Michael

TITAS ONLINE MARKET

unread,
Apr 14, 2023, 9:06:27 AM4/14/23
to Django users

Setting up a new Django project doesn't require much code copying, my friend. This can be done more simply and easily. You follow the new tutorial. Also if you have problem knock me I don't know much but I would be happy to discuss with you.
Reply all
Reply to author
Forward
0 new messages