# HG changeset patch # User nishanth # Date 1270724746 -19800 # Node ID 18dc0362f5500cd70605f90cd4179942ec0c37a6 # Parent 30a0f9e20fd495d51c5ca9df1a2d2d8bba34aed3 app ready on django admin interface. but must take care of anonymous user case . diff -r 30a0f9e20fd4 -r 18dc0362f550 .hgignore --- a/.hgignore Thu Apr 08 16:18:05 2010 +0530 +++ b/.hgignore Thu Apr 08 16:35:46 2010 +0530 @@ -2,3 +2,4 @@ *.db *.pyc +*.swp diff -r 30a0f9e20fd4 -r 18dc0362f550 feedback/admin.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/feedback/admin.py Thu Apr 08 16:35:46 2010 +0530 @@ -0,0 +1,5 @@ +from django.contrib import admin + +from workshop.feedback.models import Feedback + +admin.site.register(Feedback) diff -r 30a0f9e20fd4 -r 18dc0362f550 feedback/models.py --- a/feedback/models.py Thu Apr 08 16:18:05 2010 +0530 +++ b/feedback/models.py Thu Apr 08 16:35:46 2010 +0530 @@ -3,7 +3,44 @@ from workshop.reg.models import Event -class FeedBack(models.Model): +TOPICS_CHOICES = (('1', 'Very relevant'), + ('2', 'Relevant'), + ('3', 'Somewhat relevant'), + ('4', 'Not relevant')) + +DEPTH_CHOICES = (('1', 'Too detailed'), + ('2', 'Detailed'), + ('3', 'Not enough detail'), + ('4', 'Poor detail')) + +METHODOLOGY_CHOICES = (('1', 'Extremely effective'), + ('2', 'Effective'), + ('3', 'Not very effective'), + ('4', 'Ineffective')) + +PACE_CHOICES = (('1', 'Too fast'), + ('2', 'Fast'), + ('3', 'Just right'), + ('4', 'Slow'), + ('5', 'Too slow')) + +APPLICABILITY_CHOICES = (('1', 'I can use most of it immediately'), + ('2', 'I can use it somewhat immediately'), + ('3', 'I cannot use it immediately'), + ('4', 'I might never use it')) + +PROBLEMS_CHOICES = (('1', 'Very intersting'), + ('2', 'Interesting'), + ('3', 'Somewhat interesting'), + ('4', 'Not interesting')) + +EXERCISES_CHOICES = (('1', 'Very instructive'), + ('2', 'Instructive'), + ('3', 'Somewhat instructive'), + ('4', 'Not instructive')) + + +class Feedback(models.Model): """ A table to hold the feedbacks. """ @@ -16,8 +53,7 @@ effectiveness_of_methodology = models.CharField(max_length=1, choices=METHODOLOGY_CHOICES, blank=True) pace_of_coverage = models.CharField(max_length=1, choices=PACE_CHOICES, blank=True) applicability = models.CharField(max_length=1, choices=APPLICABILITY_CHOICES, blank=True) - choice_of_problems = models.CharField(max_length=1, choices=TOPICS_RANGE_CHOICES, blank=True) - chocice_of_exercises = models.CharField(max_length=1, choices=TOPICS_RANGE_CHOICES, blank=True) + choice_of_problems = models.CharField(max_length=1, choices=PROBLEMS_CHOICES, blank=True) + chocice_of_exercises = models.CharField(max_length=1, choices=EXERCISES_CHOICES, blank=True) comments = models.TextField(verbose_name="General comments", blank=True) - is_filled = models.BooleanField(default=True) diff -r 30a0f9e20fd4 -r 18dc0362f550 reg/models.py --- a/reg/models.py Thu Apr 08 16:18:05 2010 +0530 +++ b/reg/models.py Thu Apr 08 16:35:46 2010 +0530 @@ -31,3 +31,5 @@ attendees = models.ManyToManyField(User, related_name="%(class)s_attendees") organizers = models.ManyToManyField(User, related_name="%(class)s_organizers") + feedback_open = models.BooleanField() + quiz_open = models.BooleanField() diff -r 30a0f9e20fd4 -r 18dc0362f550 settings.py --- a/settings.py Thu Apr 08 16:18:05 2010 +0530 +++ b/settings.py Thu Apr 08 16:35:46 2010 +0530 @@ -78,7 +78,7 @@ 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', - #'workshop.feedback', + 'workshop.feedback', 'workshop.reg', #'workshop.quiz', )