Changeset bc1e568 in firmaeventos for participantes


Ignore:
Timestamp:
Nov 22, 2017, 10:50:29 AM (7 years ago)
Author:
lhernandez <lhernandez@…>
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.
Message:

Merge branch 'master' of https://github.com/cenditel-desarrollo/FirmaEventos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • participantes/views.py

    r27c0bd4 rd17da63  
    22from django.http import JsonResponse
    33from django.views import View
     4from django.utils.decorators import method_decorator
     5from django.views.decorators.csrf import csrf_exempt
    46
    57from .models import (
     
    4143        return JsonResponse(data,safe=False)
    4244
    43 
     45@method_decorator(csrf_exempt, name='dispatch')
    4446class AjaxParticipanteFirmaEvento(View):
    4547    """!
     
    6971        serial = request.POST.get('serial', None)
    7072        pasaporte = request.POST.get('pasaporte', None)
     73        pasaporte = request.POST.get('pasaporte', None)
    7174        if evento_id is not None and pasaporte is not None:
    7275            if serial is not None:
    7376                try:
    74                     update_evento = self.model.object.get(pk=evento_id)
     77                    update_evento = self.model.objects.get(pk=evento_id)
    7578                    update_evento.serial = serial
    7679                    update_evento.save()
     
    8184                    mensaje += 'No existe el evento que desea actualizar \n'
    8285            try:
    83                 participante = Participante.object.get(pasaporte=pasaporte)
     86                participante = Participante.objects.get(pasaporte=pasaporte)
    8487            except Exception as e:
    8588                print (e)
     
    8891                            participantes que se ecuentran registrados \n'
    8992            try:
    90                 update_parti_event = self.model_participante.object.get(
     93                update_parti_event = self.model_participante.objects.get(
    9194                                    fk_participante=participante.pk,
    9295                                    fk_evento=evento_id)
Note: See TracChangeset for help on using the changeset viewer.