F
F
First Name Last Name2021-01-25 14:22:17
Django
First Name Last Name, 2021-01-25 14:22:17

Error in Django "Not found the requested resource was not found on this server"?

Good afternoon. I've been learning Django and how to practice building a simple website. When I added 1 application, everything was fine, but when I created the second application, problems already started. I deleted and created the application (about) several times. When I follow the link 27.0.0.1:8000/about, Django gives me the error "Not found the requested resource was not found on this server". How to fix? Thanks for your reply in advance.

main urls file
from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path('about', include('about.urls')),
path('', include('main.urls')),
path('admin/', admin.site.urls),
]

urls from about
from django.urls import path
from . import views

urlpatterns = [
path('about', views.about),
]

views
from django.shortcuts import render

# Create your views here.

def about(request):
return render(request, 'about/about.html')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2021-01-25
@alikk_python

you yourself described the path - 127.0.0.1:8000/aboutabout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question