feedback/forms.py
author nishanth
Wed, 30 Jun 2010 10:29:38 +0530
changeset 71 1279f0094687
parent 5 9a671f3eb24c
permissions -rw-r--r--
now list of feedbacks and report are viewable only if there are feedbacks submitted.

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