from django.db import models
from picampaign.campaign.models import CampaignContact from picampaign.organization.models import FeedbackCategory
from django.utils.translation import ugettext_lazy as _
class Feedback(models.Model): id = models.AutoField(primary_key=True) callee = models.ForeignKey(CampaignContact) category = models.ForeignKey(FeedbackCategory) comment = models.CharField(max_length=512, blank=True) def __unicode__(self):
return _('feedback for %(callee contact) on %(campaign title)') % \ {'callee contact': self.callee.contact, 'campaign title': self.callee.campaign.title}