feedback/forms.py
author nishanth
Thu, 01 Jul 2010 16:20:17 +0530
changeset 81 848c009b8a60
parent 5 9a671f3eb24c
permissions -rw-r--r--
now topic name is displayed instead of topic number in list_questions page

from django import forms

from offline.feedback.models import Feedback

class FeedbackForm(forms.ModelForm):
    """ A form to collect the feedback.
    """

    class Meta:
        model = Feedback
        exclude = [ 'event', 'day', 'user_ip']

    def clean_comments(self):
        comments = self.cleaned_data['comments']
        return comments.strip()