1👍
You say you want to pass it, but you have avoided doing that in your view. The third parameter to render
, which you explicitly miss out, is the dictionary of keys and values to pass to the template. You need to accept the variable in your view, and pass it in the context.
def personnel_results(request, pk):
return render(request, 'personnel-results.html', {'pk': pk})
This is well covered in the tutorial – you should go back and do that.
Source:stackexchange.com