summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-06-13 13:01:35 +0530
committerGitHub2017-06-13 13:01:35 +0530
commitebc8a2af6d4fdf52a9703701a97a3abfaf66ed06 (patch)
treed62d1a13d2651e2018df587f33ff1de5cb082076 /yaksh/models.py
parenteae6ee7ceb25f78b216a5e2c9d6165513272e4cb (diff)
parent9e737cd9b30d2e0a4c4e5e3feab646a70b5ebf9a (diff)
downloadonline_test-ebc8a2af6d4fdf52a9703701a97a3abfaf66ed06.tar.gz
online_test-ebc8a2af6d4fdf52a9703701a97a3abfaf66ed06.tar.bz2
online_test-ebc8a2af6d4fdf52a9703701a97a3abfaf66ed06.zip
Merge pull request #298 from adityacp/views_test
Views test
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 79732cc..2fa34e4 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -78,9 +78,10 @@ test_status = (
def get_assignment_dir(instance, filename):
+ upload_dir = instance.question_paper.quiz.description.replace(" ", "_")
return os.sep.join((
- instance.question_paper.quiz.description, instance.user.username,
- str(instance.assignmentQuestion.id), filename
+ upload_dir, instance.user.username, str(instance.assignmentQuestion.id),
+ filename
))