Changeset bc1e568 in firmaeventos for participantes
- Timestamp:
- Nov 22, 2017, 10:50:29 AM (7 years ago)
- Branches:
- master
- Children:
- 9add819, 6312fce
- Parents:
- ad59aa1 (diff), 287657f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
participantes/views.py
r27c0bd4 rd17da63 2 2 from django.http import JsonResponse 3 3 from django.views import View 4 from django.utils.decorators import method_decorator 5 from django.views.decorators.csrf import csrf_exempt 4 6 5 7 from .models import ( … … 41 43 return JsonResponse(data,safe=False) 42 44 43 45 @method_decorator(csrf_exempt, name='dispatch') 44 46 class AjaxParticipanteFirmaEvento(View): 45 47 """! … … 69 71 serial = request.POST.get('serial', None) 70 72 pasaporte = request.POST.get('pasaporte', None) 73 pasaporte = request.POST.get('pasaporte', None) 71 74 if evento_id is not None and pasaporte is not None: 72 75 if serial is not None: 73 76 try: 74 update_evento = self.model.object .get(pk=evento_id)77 update_evento = self.model.objects.get(pk=evento_id) 75 78 update_evento.serial = serial 76 79 update_evento.save() … … 81 84 mensaje += 'No existe el evento que desea actualizar \n' 82 85 try: 83 participante = Participante.object .get(pasaporte=pasaporte)86 participante = Participante.objects.get(pasaporte=pasaporte) 84 87 except Exception as e: 85 88 print (e) … … 88 91 participantes que se ecuentran registrados \n' 89 92 try: 90 update_parti_event = self.model_participante.object .get(93 update_parti_event = self.model_participante.objects.get( 91 94 fk_participante=participante.pk, 92 95 fk_evento=evento_id)
Note: See TracChangeset
for help on using the changeset viewer.