summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authormaheshgudi2016-09-15 17:32:34 +0530
committermaheshgudi2016-09-15 17:32:34 +0530
commit4797964bed5bf18944b6445000b7b4f1bf6d80e3 (patch)
tree8ad7200b9f81745b4318c4b58b3de0b211ed9ffa /yaksh
parentbcf46d1462c35e9c8df2509a31ac3200383976fc (diff)
downloadonline_test-4797964bed5bf18944b6445000b7b4f1bf6d80e3.tar.gz
online_test-4797964bed5bf18944b6445000b7b4f1bf6d80e3.tar.bz2
online_test-4797964bed5bf18944b6445000b7b4f1bf6d80e3.zip
admin can delete answerpaper
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/admin.py3
-rw-r--r--yaksh/models.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/yaksh/admin.py b/yaksh/admin.py
index b5c8933..58af7b2 100644
--- a/yaksh/admin.py
+++ b/yaksh/admin.py
@@ -1,5 +1,5 @@
from yaksh.models import Question, Quiz, QuestionPaper
-from yaksh.models import TestCase, StandardTestCase, StdioBasedTestCase, Course
+from yaksh.models import TestCase, StandardTestCase, StdioBasedTestCase, Course, AnswerPaper
from django.contrib import admin
admin.site.register(Question)
@@ -9,3 +9,4 @@ admin.site.register(StdioBasedTestCase)
admin.site.register(Course)
admin.site.register(Quiz)
admin.site.register(QuestionPaper)
+admin.site.register(AnswerPaper) \ No newline at end of file
diff --git a/yaksh/models.py b/yaksh/models.py
index 0f801b8..8e8a0d3 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -904,7 +904,9 @@ class AnswerPaper(models.Model):
def __unicode__(self):
u = self.user
- return u'Question paper for {0} {1}'.format(u.first_name, u.last_name)
+ q = self.question_paper.quiz
+ return u'AnswerPaper paper of {0} {1} for quiz {2}'\
+ .format(u.first_name, u.last_name, q.description)
###############################################################################