feedback/forms.py
author nishanth
Tue, 29 Jun 2010 11:21:52 +0530
changeset 57 0ca5016cde82
parent 5 9a671f3eb24c
permissions -rw-r--r--
added another field to the question_bank model and hence the choices related to that model

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