1
|
1 |
from django.db import models
|
|
2 |
|
3
|
3 |
from offline.event.models import Event
|
|
4 |
|
|
5 |
TOPICS_CHOICES = (('1', 'Very relevant'),
|
|
6 |
('2', 'Relevant'),
|
|
7 |
('3', 'Somewhat relevant'),
|
|
8 |
('4', 'Not relevant'))
|
|
9 |
|
|
10 |
DEPTH_CHOICES = (('1', 'Too detailed'),
|
|
11 |
('2', 'Detailed'),
|
|
12 |
('3', 'Not enough detail'),
|
|
13 |
('4', 'Poor detail'))
|
|
14 |
|
|
15 |
METHODOLOGY_CHOICES = (('1', 'Extremely effective'),
|
|
16 |
('2', 'Effective'),
|
|
17 |
('3', 'Not very effective'),
|
|
18 |
('4', 'Ineffective'))
|
|
19 |
|
|
20 |
PACE_CHOICES = (('1', 'Too fast'),
|
|
21 |
('2', 'Fast'),
|
|
22 |
('3', 'Just right'),
|
|
23 |
('4', 'Slow'),
|
|
24 |
('5', 'Too slow'))
|
|
25 |
|
|
26 |
APPLICABILITY_CHOICES = (('1', 'I can use most of it immediately'),
|
|
27 |
('2', 'I can use it somewhat immediately'),
|
|
28 |
('3', 'I cannot use it immediately'),
|
|
29 |
('4', 'I might never use it'))
|
|
30 |
|
|
31 |
PROBLEMS_CHOICES = (('1', 'Very intersting'),
|
|
32 |
('2', 'Interesting'),
|
|
33 |
('3', 'Somewhat interesting'),
|
|
34 |
('4', 'Not interesting'))
|
|
35 |
|
|
36 |
EXERCISES_CHOICES = (('1', 'Very instructive'),
|
|
37 |
('2', 'Instructive'),
|
|
38 |
('3', 'Somewhat instructive'),
|
|
39 |
('4', 'Not instructive'))
|
|
40 |
|
|
41 |
|
|
42 |
class Feedback(models.Model):
|
|
43 |
""" A table to hold the feedbacks.
|
|
44 |
"""
|
|
45 |
|
|
46 |
event = models.ForeignKey(Event, related_name="%(class)s")
|
|
47 |
day = models.CharField(max_length=1, default='1')
|
|
48 |
user_ip = models.CharField(max_length=15)
|
|
49 |
|
|
50 |
topics = models.CharField(max_length=1, choices=TOPICS_CHOICES,
|
|
51 |
verbose_name="Range of topics covered", blank=True)
|
|
52 |
depth = models.CharField(max_length=1, choices=DEPTH_CHOICES,
|
|
53 |
verbose_name="Depth of coverage", 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)
|
|
58 |
applicability = models.CharField(max_length=1, choices=APPLICABILITY_CHOICES, blank=True)
|
|
59 |
problems = models.CharField(max_length=1, choices=PROBLEMS_CHOICES,
|
|
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)
|
|
63 |
comments = models.TextField(verbose_name="General comments", blank=True)
|
|
64 |
|