我想在服务器中显示一个简单的问候,但收到错误消息“找不到页面”。
这是我的代码:Analytic_web.urls.py
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path(r'jas/', include('website.urls')),
path('admin/', admin.site.urls),
]
website.urls.py:
from django.urls import path
from . import views
urlpatterns = [
path(r'jas/', views.home, name='home'),
]
views.py:
from django.shortcuts import render
from django.http import HttpResponse
def home(request):
return render(request, '/templates/website/home.html' )
主页.html:
<h1>Helllllllloooooooooowwwwwwwwwwwww</h1>
紫衣仙女
相关分类