feedback/forms.py
changeset 4 e3b8a3ae3857
child 5 9a671f3eb24c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/feedback/forms.py	Mon Apr 19 22:06:51 2010 +0530
@@ -0,0 +1,15 @@
+from django import forms
+
+from ws_app.feedback.models import Feedback
+
+class FeedbackForm(forms.ModelForm):
+    """ A form to collect the feedback.
+    """
+
+    class Meta:
+        model = Feedback
+        exclude = [ 'event', 'day']
+
+    def clean_comments(self):
+        comments = self.cleaned_data['comments']
+        return comments.strip()