I would like to add documents to an employee's profile in a form but I would like the form to automatically select the id or the (pk) of the employee's page, anyone have the solution?
view.py
def createDocument(request):
forms = documentForm()
if request.method == 'POST':
forms = documentForm(request.POST, request.FILES)
if forms.is_valid():
forms.save()
return redirect('/employe')
context = {'forms':forms}
return render(request, 'accounts/document_form.html', context)