diff options
author | adityacp | 2016-08-30 22:42:02 +0530 |
---|---|---|
committer | adityacp | 2016-08-30 22:42:02 +0530 |
commit | d398cf7f30fe1f5e09fd0424824eff614374652d (patch) | |
tree | b48d8fa21d80dcd275d7d84e0ffb3aef23c650bf /yaksh/management | |
parent | 32867d340cfb125a2fa20019997ae5e17f466574 (diff) | |
download | online_test-d398cf7f30fe1f5e09fd0424824eff614374652d.tar.gz online_test-d398cf7f30fe1f5e09fd0424824eff614374652d.tar.bz2 online_test-d398cf7f30fe1f5e09fd0424824eff614374652d.zip |
changes in create demo course
Diffstat (limited to 'yaksh/management')
-rw-r--r-- | yaksh/management/commands/create_demo_course.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/management/commands/create_demo_course.py b/yaksh/management/commands/create_demo_course.py index 21c56b7..e71e0ae 100644 --- a/yaksh/management/commands/create_demo_course.py +++ b/yaksh/management/commands/create_demo_course.py @@ -1,7 +1,7 @@ import os from django.core.management.base import BaseCommand from yaksh.models import Course, Question, Quiz, QuestionPaper, Profile, FileUpload -from yaksh.views import extract_files, read_json +from yaksh.file_utils import extract_files from django.contrib.auth.models import User from django.utils import timezone from django.core.files import File @@ -46,7 +46,8 @@ def create_demo_course(): f_path = os.path.join(os.getcwd(), 'yaksh', 'fixtures', 'demo_questions.json') zip_file_path = os.path.join(os.getcwd(), 'yaksh', 'fixtures', 'demo_questions.zip') extract_files(zip_file_path) - read_json("questions_dump.json", user) + ques = Question() + ques.read_json("questions_dump.json", user) questions = Question.objects.filter(active=True, summary="Demo_Question") |