Changeset 94b3e3f in firmaeventos for participantes


Ignore:
Timestamp:
Nov 20, 2017, 3:47:37 PM (7 years ago)
Author:
lhernandez <lhernandez@…>
Branches:
master
Children:
16cf088
Parents:
c9f75d7
Message:

Implementado registro de eventos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • participantes/forms.py

    r8fa24c3 r94b3e3f  
    22from django.core.exceptions import NON_FIELD_ERRORS
    33from django.forms import (
    4        inlineformset_factory, modelform_factory
     4       inlineformset_factory, modelform_factory, modelformset_factory, formset_factory
    55   )
    66
     
    2626        """
    2727        model = Participante
    28         fields=('nombres', 'apellidos', 'pasaporte', 'correo')
     28        fields=['nombres', 'apellidos', 'pasaporte', 'correo']
    2929
    3030    def __init__(self, *args, **kwargs):
     
    9090                                    fields=('nombres', 'apellidos',
    9191                                            'pasaporte', 'correo'))
     92
     93FormsetParticipanteEvento = modelformset_factory(Participante, form=FormsetParticipanteEvento, fields=('nombres', 'apellidos',
     94                                            'pasaporte', 'correo'),
     95                                    extra=1)
     96
     97#FormsetParticipanteEvento= FormsetParticipanteEvento(queryset=Participante.objects.none())
Note: See TracChangeset for help on using the changeset viewer.