Revision 95a51cdc snf-astakos-app/astakos/im/forms.py

b/snf-astakos-app/astakos/im/forms.py
529 529
                yield (suffix, value)
530 530

  
531 531
class AstakosGroupSearchForm(forms.Form):
532
    q = forms.CharField(max_length=200, label='')
533

  
534
class MembershipCreationForm(forms.ModelForm):
535
    # TODO check not to hit the db
536
    group = forms.ModelChoiceField(
537
        queryset=AstakosGroup.objects.all(),
538
        widget=forms.HiddenInput()
539
    )
540
    person = forms.ModelChoiceField(
541
        queryset=AstakosUser.objects.all(),
542
        widget=forms.HiddenInput()
543
    )
544
    date_requested = forms.DateField(
545
        widget=forms.HiddenInput(),
546
        input_formats="%d/%m/%Y"
547
    )
548
    
549
    class Meta:
550
        model = Membership
551
        exclude = ('date_joined',)
552
    
553
    def __init__(self, *args, **kwargs):
554
        super(MembershipCreationForm, self).__init__(*args, **kwargs)
532
    q = forms.CharField(max_length=200, label='')

Also available in: Unified diff