未找到带有参数 '('',)' 的 'project_detail' 的错误反转。尝试了 1 种模式:['project/(?P[0-9]+)$']
网址.py
urlpatterns = [
path('', views.home, name='home'),
path('<int:id>', views.project_detail, name='project_detail'),
]
视图.py
def project_detail(request, id):
return render(request, 'portfolio/project_detail.html')