summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--website/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/website/views.py b/website/views.py
index 299fa06..4e81d63 100644
--- a/website/views.py
+++ b/website/views.py
@@ -17,6 +17,7 @@ from spoken_auth.models import TutorialDetails, TutorialResources, Group
from website.forms import NewQuestionForm, AnswerQuesitionForm
from website.helpers import get_video_info, prettify
from django.db.models import Count
+from forums.config import VIDEO_PATH
def is_administrator(user):
if user and user.groups.filter(name='Administrator').count() == 1:
@@ -369,9 +370,8 @@ def ajax_duration(request):
Q(tutorial_detail_id=video_detail.id),
Q(language__name='English')
)
- # comment while pushing to git and un-comment on local
- # on local machine give your local path of videos folder
- video_path = '/home/fossee/devel/spoken/media/videos/{0}/{1}/{2}'.format(
+ video_path = '{0}/{1}/{2}/{3}'.format(
+ VIDEO_PATH,
str(video_detail.foss_id),
str(video_detail.id),
video_resource.video
@@ -494,7 +494,7 @@ def ajax_hide_question(request):
key = request.POST['question_id']
question = Question.objects.filter(pk=key)
if question.exists():
- question = question.first()
+ question = question[0]
question.status = 0
if request.POST['status'] == '0':
question.status = 1