summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2018-07-10 15:47:46 +0530
committeradityacp2018-07-10 15:47:46 +0530
commitc075bc00bc57507f2af4d47f7f2e5e063df6921a (patch)
tree79cbae95ddcaa6bbfa7cd47944e249f9b242464d /yaksh/views.py
parent5bd270e21bfdf08bd73940bf471ebcf566fb9de6 (diff)
downloadonline_test-c075bc00bc57507f2af4d47f7f2e5e063df6921a.tar.gz
online_test-c075bc00bc57507f2af4d47f7f2e5e063df6921a.tar.bz2
online_test-c075bc00bc57507f2af4d47f7f2e5e063df6921a.zip
Change in file_utils, forms, models, lesson.css, add_lesson.html, views
- Add new function in the file_utils to render template - Add webm as supported video format in forms - Add help text in video_file field - Add lesson.css file for adding custom styling for lessons - Add static_files dict in download_course views function
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index f159411..497816c 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -2832,7 +2832,14 @@ def download_course(request, course_id):
course.name))
current_dir = os.path.dirname(__file__)
course_name = course.name.replace(" ", "_")
- zip_file = course.create_zip(current_dir)
+
+ # Static files required for styling in html template
+ static_files = {"js": ["bootstrap.js", "bootstrap.min.js",
+ "jquery-1.9.1.min.js", "video.js"],
+ "css": ["bootstrap.css", "bootstrap.min.css",
+ "video-js.css", "offline.css"],
+ "images": ["yaksh_banner.png"]}
+ zip_file = course.create_zip(current_dir, static_files)
zip_file.seek(0)
response = HttpResponse(content_type='application/zip')
response['Content-Disposition'] = 'attachment; filename={0}.zip'.format(