feedback/forms.py
author nishanth
Tue, 29 Jun 2010 16:12:29 +0530
changeset 103 ee9261c5ba18
parent 94 5de0009c0d71
permissions -rwxr-xr-x
the list_attendees page looks better now
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
     1
from django import forms
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
     2
64
df751cd8a1e4 renamed import .
nishanth
parents: 10
diff changeset
     3
from ws_app.feedback.models import Feedback
5
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
     4
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
     5
class FeedbackForm(forms.ModelForm):
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
     6
    """ A form to collect the feedback.
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
     7
    """
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
     8
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
     9
    class Meta:
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
    10
        model = Feedback
94
5de0009c0d71 added 500 template and added clean on comments and added comments in view report.
nishanth
parents: 64
diff changeset
    11
        exclude = [ 'event', 'day']
5
37e4027fba48 submit and list feedback done
nishanth
parents:
diff changeset
    12
94
5de0009c0d71 added 500 template and added clean on comments and added comments in view report.
nishanth
parents: 64
diff changeset
    13
    def clean_comments(self):
5de0009c0d71 added 500 template and added clean on comments and added comments in view report.
nishanth
parents: 64
diff changeset
    14
        comments = self.cleaned_data['comments']
5de0009c0d71 added 500 template and added clean on comments and added comments in view report.
nishanth
parents: 64
diff changeset
    15
        return comments.strip()