diff options
author | adityacp | 2017-03-10 11:10:09 +0530 |
---|---|---|
committer | adityacp | 2017-03-10 11:10:09 +0530 |
commit | 2955c57b10c33a12b9c6def60169ee2105ca20e4 (patch) | |
tree | dfe44e031ecc48a794fc01d333f3b89d41a10a86 /yaksh/models.py | |
parent | ce7238aef6d5080d8f7ea79b96c9569bf191f0b8 (diff) | |
download | online_test-2955c57b10c33a12b9c6def60169ee2105ca20e4.tar.gz online_test-2955c57b10c33a12b9c6def60169ee2105ca20e4.tar.bz2 online_test-2955c57b10c33a12b9c6def60169ee2105ca20e4.zip |
Changes in models and views
- Display error message if questions_dump.json is not found in zip file
- Provide a sample zip file to for easy zip file creation
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 398f508..0a84d4e 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -402,6 +402,9 @@ class Question(models.Model): with open(json_file, 'r') as q_file: questions_list = q_file.read() self.load_questions(questions_list, user, file_path, files) + return "Questions Uploaded Successfully" + else: + return "Please upload zip file with questions_dump.json in it." def create_demo_questions(self, user): zip_file_path = os.path.join( |