I'm new in django and i have this input in HTML,and i nedd to get the string typed from the user and send for my views.py:
<form id="username_exists_form" method='GET'>
Name: <input type="username" name="username" />
<button type='submit'> Check </button>
</form>
That's my view.py, i nedd the string replace "username":
template_name = 'Exames.html'
def get_context_data(self,**kwargs):
context = super(ShowExames, self).get_context_data(**kwargs)
exames = Examlabs.objects.filter(id_atendimento = username)
context.update({'exames': exames})
return context
def get_queryset(self):
return Examlabs.objects.all()```