author | nishanth |
Mon, 19 Apr 2010 22:06:51 +0530 | |
changeset 4 | e3b8a3ae3857 |
child 5 | 9a671f3eb24c |
permissions | -rw-r--r-- |
4
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
1 |
from django import forms |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
2 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
3 |
from ws_app.feedback.models import Feedback |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
4 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
5 |
class FeedbackForm(forms.ModelForm): |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
6 |
""" A form to collect the feedback. |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
7 |
""" |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
8 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
9 |
class Meta: |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
10 |
model = Feedback |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
11 |
exclude = [ 'event', 'day'] |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
12 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
13 |
def clean_comments(self): |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
14 |
comments = self.cleaned_data['comments'] |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
15 |
return comments.strip() |