Python 在视图上传递id
我想在不传递id的视图函数中传递组织的idPython 在视图上传递id,python,django,Python,Django,我想在不传递id的视图函数中传递组织的id Views.py url.py 试试这个 from django.urls import reverse return redirect(reverse('results_view', kwargs={"organization_id": post.pk})) 非常感谢……这个works@zero...hey. 你介意帮我检查一下吗? path('OrgForm/', OrgForm_view, name="O
from django.urls import reverse
return redirect(reverse('results_view', kwargs={"organization_id": post.pk}))
非常感谢……这个works@zero...hey. 你介意帮我检查一下吗?
path('OrgForm/', OrgForm_view, name="OrgForm"),
path(r'results_view/<int:organization_id>/', views.results_view, name="results_view"),
Reverse for 'results_view' with arguments '('',)' not found. 1 pattern(s) tried: ['results_view\\/(?P<organization_id>[0-9]+)\\/$']
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/results_view/%7B%7Borgz.id%7D%7D
from django.urls import reverse
return redirect(reverse('results_view', kwargs={"organization_id": post.pk}))