author | nishanth |
Thu, 15 Apr 2010 12:36:21 +0530 | |
changeset 39 | 61d558a69b0d |
parent 12 | f57b0a7f24d9 |
child 53 | 0a4b2c49f718 |
permissions | -rw-r--r-- |
0 | 1 |
from django.db import models |
2 |
from django.contrib.auth.models import User |
|
3 |
||
4 |
from workshop.reg.models import Event |
|
5 |
||
1
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
6 |
TOPICS_CHOICES = (('1', 'Very relevant'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
7 |
('2', 'Relevant'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
8 |
('3', 'Somewhat relevant'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
9 |
('4', 'Not relevant')) |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
10 |
|
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
11 |
DEPTH_CHOICES = (('1', 'Too detailed'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
12 |
('2', 'Detailed'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
13 |
('3', 'Not enough detail'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
14 |
('4', 'Poor detail')) |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
15 |
|
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
16 |
METHODOLOGY_CHOICES = (('1', 'Extremely effective'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
17 |
('2', 'Effective'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
18 |
('3', 'Not very effective'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
19 |
('4', 'Ineffective')) |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
20 |
|
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
21 |
PACE_CHOICES = (('1', 'Too fast'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
22 |
('2', 'Fast'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
23 |
('3', 'Just right'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
24 |
('4', 'Slow'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
25 |
('5', 'Too slow')) |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
26 |
|
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
27 |
APPLICABILITY_CHOICES = (('1', 'I can use most of it immediately'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
28 |
('2', 'I can use it somewhat immediately'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
29 |
('3', 'I cannot use it immediately'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
30 |
('4', 'I might never use it')) |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
31 |
|
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
32 |
PROBLEMS_CHOICES = (('1', 'Very intersting'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
33 |
('2', 'Interesting'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
34 |
('3', 'Somewhat interesting'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
35 |
('4', 'Not interesting')) |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
36 |
|
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
37 |
EXERCISES_CHOICES = (('1', 'Very instructive'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
38 |
('2', 'Instructive'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
39 |
('3', 'Somewhat instructive'), |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
40 |
('4', 'Not instructive')) |
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
41 |
|
18dc0362f550
app ready on django admin interface. but must take care of anonymous user case .
nishanth
parents:
0
diff
changeset
|
42 |
class Feedback(models.Model): |
0 | 43 |
""" A table to hold the feedbacks. |
44 |
""" |
|
45 |
||
2 | 46 |
user_ip = models.CharField(max_length=15) |
11
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
47 |
event = models.ForeignKey(Event, related_name="%(class)s") |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
48 |
day = models.CharField(max_length=1, default='1') |
0 | 49 |
|
11
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
50 |
topics = models.CharField(max_length=1, choices=TOPICS_CHOICES, |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
51 |
verbose_name="Range of topics covered", blank=True) |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
52 |
depth = models.CharField(max_length=1, choices=DEPTH_CHOICES, |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
53 |
verbose_name="Depth of coverage", blank=True) |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
54 |
methodology = models.CharField(max_length=1, choices=METHODOLOGY_CHOICES, |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
55 |
verbose_name="Effectiveness of methodology", blank=True) |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
56 |
pace = models.CharField(max_length=1, choices=PACE_CHOICES, |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
57 |
verbose_name="Pace of coverage", blank=True) |
0 | 58 |
applicability = models.CharField(max_length=1, choices=APPLICABILITY_CHOICES, blank=True) |
11
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
59 |
problems = models.CharField(max_length=1, choices=PROBLEMS_CHOICES, |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
60 |
verbose_name="Choice of problems", blank=True) |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
61 |
exercises = models.CharField(max_length=1, choices=EXERCISES_CHOICES, |
334550460bd7
added the view event functionality and submitting feedback according to the status .
nishanth
parents:
10
diff
changeset
|
62 |
verbose_name="Choice of exercises", blank=True) |
0 | 63 |
comments = models.TextField(verbose_name="General comments", blank=True) |
64 |
||
5 | 65 |
def __unicode__(self): |
66 |
||
12 | 67 |
return unicode(self.event.title) |