-1
I’m trying to learn Django, but I stopped to copy data from the student table to a table that records whether he checked in or checked out at school.
Students will wear a badge with CPF in Barcode, the reader transcribes the CPF in the Field and give enter, the system searches the CPF of the Student in the database and brings the information (up to this point I already got). Only that the system must record at the same time in the Check table the following information (Date-time-CPF-NAME-Status), and display the last accesses in the list on the same page.
def busca_alunos(request): dice = {}
if check_busca:
alunos = Aluno.objects.all()
alunos = Aluno.objects.filter(cpf=check_busca)
else:
alunos = Aluno.objects.all()
dados['alunos'] = alunos
return render(request, 'sistema/forms2.html', dados)
As in this same function copy data to the Check table and recognize if you are doing Check-In or Out. I am grateful for your help!