I have the following query:
comision = comisiones_pagadas.objects.values('codigo_proceso','fecha_pago','doctor_id').order_by('-fecha_pago').distinct()
At the moment of passing 'commission' to the template I can not present the doctor's name: that is. comision.doctor.nombres since doctor_id is foreign key of the table Doctors, apparently the query does not get it as an object but as a dictionary of values, how could you solve it?