feedback/forms.py
author nishanth
Fri, 23 Apr 2010 16:44:30 +0530
changeset 101 fd9a1d16c5bb
parent 94 5de0009c0d71
permissions -rwxr-xr-x
changed the title

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()