Changeset 45f784a in firmaeventos


Ignore:
Timestamp:
Nov 20, 2017, 4:04:56 PM (6 years ago)
Author:
lhernandez <lhernandez@…>
Branches:
master
Children:
b8fffff
Parents:
d3c0ab7
Message:

Solventado error funcional del modelformset_factory

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • eventos/views.py

    r8ec6ee3 r45f784a  
    1313)
    1414from .models import Evento
     15from participantes.models import Participante
    1516
    1617
     
    3536            context['form'] = self.form_class()
    3637        if 'form2' not in context:
    37             context['form2'] = self.form_participante
     38            context['form2'] = self.form_participante(queryset=Participante.objects.none())
    3839        return context
    3940
  • participantes/forms.py

    r16cf088 r45f784a  
    9191                                            'pasaporte', 'correo'))
    9292
    93 FormsetParticipanteEvento = modelformset_factory(Participante, form=FormsetParticipanteEvento, fields=('nombres', 'apellidos',
    94                                             'pasaporte', 'correo'),
    95                                     extra=1)
    96 
    97 #FormsetParticipanteEvento= FormsetParticipanteEvento(queryset=Participante.objects.none())
     93FormsetParticipanteEvento = modelformset_factory(
     94                            Participante,
     95                            form=FormsetParticipanteEvento,
     96                            fields=('nombres', 'apellidos',
     97                                    'pasaporte', 'correo'),
     98                            extra=1)
Note: See TracChangeset for help on using the changeset viewer.