feedback/forms.py
author nishanth
Sat, 17 Apr 2010 13:38:25 +0530
changeset 96 e51b94b6b5a4
parent 94 5de0009c0d71
permissions -rwxr-xr-x
now comments also will be displayed through the unordered_list filter

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