feedback/forms.py
author nishanth
Fri, 23 Apr 2010 16:41:17 +0530
changeset 100 cdc0a363dc53
parent 94 5de0009c0d71
permissions -rwxr-xr-x
update time setting

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