feedback/forms.py
author nishanth
Sat, 17 Apr 2010 13:15:05 +0530
changeset 94 5de0009c0d71
parent 64 df751cd8a1e4
permissions -rwxr-xr-x
added 500 template and added clean on comments and added comments in view report.

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