diff options
author | adityacp | 2020-02-19 12:13:38 +0530 |
---|---|---|
committer | adityacp | 2020-02-19 12:15:43 +0530 |
commit | fcfd868e44f0c768d05ef0dd58c72e46f9cbee61 (patch) | |
tree | 8909446448aabd1c0ca26807afec4fff9ce0cd3c /yaksh/views.py | |
parent | f2d1d8fe76109a5b7c53e68de2bd86230874ba90 (diff) | |
download | online_test-fcfd868e44f0c768d05ef0dd58c72e46f9cbee61.tar.gz online_test-fcfd868e44f0c768d05ef0dd58c72e46f9cbee61.tar.bz2 online_test-fcfd868e44f0c768d05ef0dd58c72e46f9cbee61.zip |
Fix pep style and add test case in test_models
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 0ae4a14..8ac8343 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1551,8 +1551,7 @@ def show_all_questions(request): ques = Question() if file_extension == "zip": files, extract_path = extract_files(questions_file) - message = ques.read_yaml(extract_path, user, - files) + message = ques.read_yaml(extract_path, user, files) elif file_extension in ["yaml", "yml"]: questions = questions_file.read() message = ques.load_questions(questions, user) @@ -1572,8 +1571,7 @@ def show_all_questions(request): response.write(zip_file.read()) return response else: - message = ("Please select atleast " + - "one question to download") + message = "Please select atleast one question to download" if request.POST.get('test') == 'test': question_ids = request.POST.getlist("question") @@ -2320,7 +2318,8 @@ def _read_user_csv(request, reader, course): counter, user.username)) else: _add_to_course(user, course) - messages.info(request, + messages.info( + request, "{0} -- {1} -- User Added Successfully".format( counter, user.username)) continue |