feedback/forms.py
author nishanth
Thu, 01 Jul 2010 17:05:57 +0530
changeset 86 404e9c1b8cff
parent 5 9a671f3eb24c
permissions -rw-r--r--
now questions are displayed properly in edit_question page. hav to implement the submit and stuff

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