feedback/models.py
changeset 11 334550460bd7
parent 10 c52d170969f0
child 12 f57b0a7f24d9
equal deleted inserted replaced
10:c52d170969f0 11:334550460bd7
    42 class Feedback(models.Model):
    42 class Feedback(models.Model):
    43     """ A table to hold the feedbacks.
    43     """ A table to hold the feedbacks.
    44     """
    44     """
    45 
    45 
    46     user_ip = models.CharField(max_length=15)
    46     user_ip = models.CharField(max_length=15)
    47     event = models.ForeignKey(Event)
    47     event = models.ForeignKey(Event, related_name="%(class)s")
    48     day = models.PositiveIntegerField(default=1)
    48     day = models.CharField(max_length=1, default='1')
    49 
    49 
    50     range_of_topics = models.CharField(max_length=1, choices=TOPICS_CHOICES,
    50     topics = models.CharField(max_length=1, choices=TOPICS_CHOICES,
    51                                        verbose_name="Range of topics covered", blank=True)
    51                               verbose_name="Range of topics covered", blank=True)
    52     depth_of_coverage = models.CharField(max_length=1, choices=DEPTH_CHOICES, blank=True)
    52     depth = models.CharField(max_length=1, choices=DEPTH_CHOICES, 
    53     effectiveness_of_methodology = models.CharField(max_length=1, choices=METHODOLOGY_CHOICES, blank=True)
    53                              verbose_name="Depth of coverage", blank=True)
    54     pace_of_coverage = models.CharField(max_length=1, choices=PACE_CHOICES, blank=True)
    54     methodology = models.CharField(max_length=1, choices=METHODOLOGY_CHOICES,
       
    55                                    verbose_name="Effectiveness of methodology", blank=True)
       
    56     pace = models.CharField(max_length=1, choices=PACE_CHOICES,
       
    57                             verbose_name="Pace of coverage", blank=True)
    55     applicability = models.CharField(max_length=1, choices=APPLICABILITY_CHOICES, blank=True)
    58     applicability = models.CharField(max_length=1, choices=APPLICABILITY_CHOICES, blank=True)
    56     choice_of_problems = models.CharField(max_length=1, choices=PROBLEMS_CHOICES, blank=True)
    59     problems = models.CharField(max_length=1, choices=PROBLEMS_CHOICES,
    57     choice_of_exercises = models.CharField(max_length=1, choices=EXERCISES_CHOICES, blank=True)
    60                                 verbose_name="Choice of problems", blank=True)
       
    61     exercises = models.CharField(max_length=1, choices=EXERCISES_CHOICES,
       
    62                                  verbose_name="Choice of exercises", blank=True)
    58     comments = models.TextField(verbose_name="General comments", blank=True)
    63     comments = models.TextField(verbose_name="General comments", blank=True)
    59 
    64 
    60     def __unicode__(self):
    65     def __unicode__(self):
    61         
    66         
    62         return unicode(self.range_of_topics +
    67         return unicode(event.title)
    63                        self.depth_of_coverage +
       
    64                        self.effectiveness_of_methodology +
       
    65                        self.pace_of_coverage +
       
    66                        self.applicability +
       
    67                        self.choice_of_problems +
       
    68                        self.choice_of_exercises
       
    69                       )