feedback/forms.py
author nishanth
Wed, 21 Apr 2010 13:20:42 +0530
changeset 31 27aa6ee92aca
parent 5 9a671f3eb24c
permissions -rw-r--r--
we shall not track db files since they are changed often. we shall maintain a .bak file which is db file and rename it appropriately before we start using the app.

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