feedback/models.py
changeset 1 18dc0362f550
parent 0 30a0f9e20fd4
child 2 c11afa8623f7
equal deleted inserted replaced
0:30a0f9e20fd4 1:18dc0362f550
     1 from django.db import models
     1 from django.db import models
     2 from django.contrib.auth.models import User
     2 from django.contrib.auth.models import User
     3 
     3 
     4 from workshop.reg.models import Event
     4 from workshop.reg.models import Event
     5 
     5 
     6 class FeedBack(models.Model):
     6 TOPICS_CHOICES = (('1', 'Very relevant'),
       
     7                   ('2', 'Relevant'),
       
     8                   ('3', 'Somewhat relevant'),
       
     9                   ('4', 'Not relevant'))
       
    10 
       
    11 DEPTH_CHOICES = (('1', 'Too detailed'),
       
    12                  ('2', 'Detailed'),
       
    13                  ('3', 'Not enough detail'),
       
    14                  ('4', 'Poor detail'))
       
    15 
       
    16 METHODOLOGY_CHOICES = (('1', 'Extremely effective'),
       
    17                        ('2', 'Effective'),
       
    18                        ('3', 'Not very effective'),
       
    19                        ('4', 'Ineffective'))
       
    20 
       
    21 PACE_CHOICES = (('1', 'Too fast'),
       
    22                 ('2', 'Fast'),
       
    23                 ('3', 'Just right'),
       
    24                 ('4', 'Slow'),
       
    25                 ('5', 'Too slow'))
       
    26 
       
    27 APPLICABILITY_CHOICES = (('1', 'I can use most of it immediately'),
       
    28                          ('2', 'I can use it somewhat immediately'),
       
    29                          ('3', 'I cannot use it immediately'),
       
    30                          ('4', 'I might never use it'))
       
    31 
       
    32 PROBLEMS_CHOICES = (('1', 'Very intersting'),
       
    33                     ('2', 'Interesting'),
       
    34                     ('3', 'Somewhat interesting'),
       
    35                     ('4', 'Not interesting'))
       
    36 
       
    37 EXERCISES_CHOICES = (('1', 'Very instructive'),
       
    38                      ('2', 'Instructive'),
       
    39                      ('3', 'Somewhat instructive'),
       
    40                      ('4', 'Not instructive'))
       
    41 
       
    42 
       
    43 class Feedback(models.Model):
     7     """ A table to hold the feedbacks.
    44     """ A table to hold the feedbacks.
     8     """
    45     """
     9 
    46 
    10     user = models.ForeignKey(User)
    47     user = models.ForeignKey(User)
    11     event = models.ForeignKey(Event)
    48     event = models.ForeignKey(Event)
    14                                        verbose_name="Range of topics covered", blank=True)
    51                                        verbose_name="Range of topics covered", blank=True)
    15     depth_of_coverage = models.CharField(max_length=1, choices=DEPTH_CHOICES, blank=True)
    52     depth_of_coverage = models.CharField(max_length=1, choices=DEPTH_CHOICES, blank=True)
    16     effectiveness_of_methodology = models.CharField(max_length=1, choices=METHODOLOGY_CHOICES, blank=True)
    53     effectiveness_of_methodology = models.CharField(max_length=1, choices=METHODOLOGY_CHOICES, blank=True)
    17     pace_of_coverage = models.CharField(max_length=1, choices=PACE_CHOICES, blank=True)
    54     pace_of_coverage = models.CharField(max_length=1, choices=PACE_CHOICES, blank=True)
    18     applicability = models.CharField(max_length=1, choices=APPLICABILITY_CHOICES, blank=True)
    55     applicability = models.CharField(max_length=1, choices=APPLICABILITY_CHOICES, blank=True)
    19     choice_of_problems = models.CharField(max_length=1, choices=TOPICS_RANGE_CHOICES, blank=True)
    56     choice_of_problems = models.CharField(max_length=1, choices=PROBLEMS_CHOICES, blank=True)
    20     chocice_of_exercises = models.CharField(max_length=1, choices=TOPICS_RANGE_CHOICES, blank=True)
    57     chocice_of_exercises = models.CharField(max_length=1, choices=EXERCISES_CHOICES, blank=True)
    21     comments = models.TextField(verbose_name="General comments", blank=True)
    58     comments = models.TextField(verbose_name="General comments", blank=True)
    22 
    59 
    23     is_filled = models.BooleanField(default=True)