summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authoradityacp2017-01-04 17:39:52 +0530
committeradityacp2017-01-04 17:39:52 +0530
commit3f9773c4eb2a21902ccdefab89c7f503a08f1743 (patch)
treeb317bf610fcd9cac3a6c685e49a3483b3fe57b17 /yaksh/models.py
parent58481cdcba38e8e602b8e2d3e5172f9e653f93a9 (diff)
downloadonline_test-3f9773c4eb2a21902ccdefab89c7f503a08f1743.tar.gz
online_test-3f9773c4eb2a21902ccdefab89c7f503a08f1743.tar.bz2
online_test-3f9773c4eb2a21902ccdefab89c7f503a08f1743.zip
Change demo settings for yaksh commands
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index d2a85f6..a91f4d2 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
from datetime import datetime, timedelta
import json
from random import sample, shuffle
@@ -382,8 +383,7 @@ class Question(models.Model):
self.load_questions(questions_list, user, file_path, files)
def create_demo_questions(self, user):
- zip_file_path = os.path.join(os.getcwd(), 'yaksh',
- 'fixtures', 'demo_questions.zip')
+ zip_file_path = os.path.join(settings.FIXTURE_DIRS, 'demo_questions.zip')
files, extract_path = extract_files(zip_file_path)
self.read_json(extract_path, user, files)