diff options
author | adityacp | 2017-03-16 16:43:12 +0530 |
---|---|---|
committer | adityacp | 2017-03-16 16:43:12 +0530 |
commit | b37244f2c6573b0f16b9dcea614400ee1ae24cf8 (patch) | |
tree | e5ae120f2c47d78e53513db25e01d028954d9f5f /yaksh/views.py | |
parent | 508a576ccfb63169c24056ded25f742bdcd186f2 (diff) | |
download | online_test-b37244f2c6573b0f16b9dcea614400ee1ae24cf8.tar.gz online_test-b37244f2c6573b0f16b9dcea614400ee1ae24cf8.tar.bz2 online_test-b37244f2c6573b0f16b9dcea614400ee1ae24cf8.zip |
Changes in models views and urls
- Handle Json parsing error
- Remove Sample file download from views and urls
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 02019f4..daa81eb 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -30,7 +30,6 @@ from yaksh.forms import UserRegisterForm, UserLoginForm, QuizForm,\ QuestionFilterForm, CourseForm, ProfileForm, UploadFileForm,\ get_object_form, FileForm, QuestionPaperForm from .settings import URL_ROOT -from django.conf import settings from yaksh.models import AssignmentUpload from .file_utils import extract_files @@ -950,18 +949,6 @@ def show_all_questions(request): context_instance=ci) @login_required -def download_demo_questions(request): - user = request.user - if not is_moderator(user): - raise Http404("You are not allowed to download!") - f_path = os.path.join(settings.FIXTURE_DIRS, "demo_questions.zip") - zip_file = open(f_path, "rb") - response = HttpResponse(zip_file, content_type='application/zip') - response['Content-Disposition'] = '''attachment;\ - filename=demo_questions.zip''' - return response - -@login_required def user_data(request, user_id, questionpaper_id=None): """Render user data.""" current_user = request.user |