app/projrev/views/helpers/forms.py
changeset 4 8d9da911ed7d
parent 1 324233b04d76
child 6 17cab73c49eb
equal deleted inserted replaced
3:252a2d9713a5 4:8d9da911ed7d
    14 class ProposalForm(forms.ModelForm):
    14 class ProposalForm(forms.ModelForm):
    15   """Creates a form for the project.
    15   """Creates a form for the project.
    16   """
    16   """
    17 
    17 
    18   document = forms.FileField()
    18   document = forms.FileField()
    19   micr_code = forms.CharField(max_length=15, required=False)
       
    20 
    19 
    21   class Meta:
    20   class Meta:
    22     # We store most of the data in Project model. So even though the
    21     # We store most of the data in Project model. So even though the
    23     # name and the purpose of the form is for Proposal acceptance, we
    22     # name and the purpose of the form is for Proposal acceptance, we
    24     # use Project model here.
    23     # use Project model here.
    25     model = Project
    24     model = Project
    26 
    25 
    27     # fields in the Project that must not appear in the form, but have
    26     # fields in the Project that must not appear in the form, but have
    28     # be automatically generated.
    27     # be automatically generated.
    29     fields = ('micr_code', 'line_item', 'institution', 'state', 'district')
    28     fields = ('line_item', 'institution', 'state', 'district')
    30 
    29 
    31 class ReviewForm(forms.ModelForm):
    30 class ReviewForm(forms.ModelForm):
    32   """Creates a form for review of proposal.
    31   """Creates a form for review of proposal.
    33   """
    32   """
    34 
    33