From: Guillaume Pellerin Date: Thu, 11 Jul 2013 15:42:37 +0000 (+0200) Subject: various record bugfix X-Git-Tag: 1.1~571 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=09234bfb1d8c595c12624743ba2849cbd2a02379;p=teleforma.git various record bugfix --- diff --git a/teleforma/templates/teleforma/course_conference_audio.html b/teleforma/templates/teleforma/course_conference_audio.html index e1e0a92b..bdd06489 100644 --- a/teleforma/templates/teleforma/course_conference_audio.html +++ b/teleforma/templates/teleforma/course_conference_audio.html @@ -8,7 +8,7 @@ var conferenceUtils = { stop : function(id){ json([id],'teleforma.conference_stop',function(){ - location.href = '{% url teleforma-home %}';}); + location.href = '{% url teleforma-conference-record %}';}); }} jQuery(window).ready(function(){ diff --git a/teleforma/views/core.py b/teleforma/views/core.py index 3782c2f5..8adef8d4 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -149,6 +149,8 @@ def get_host(request): host = request.META['HTTP_HOST'] if ':' in host: host = host.split(':')[0] + if host == 'localhost': + host = '127.0.0.1' return host def get_periods(user): @@ -531,6 +533,8 @@ class ConferenceRecordView(FormView): except: pass + return super(ConferenceRecordView, self).form_valid(form) + def snapshot(self, url, dir): width = 160 height = 90 @@ -539,7 +543,7 @@ class ConferenceRecordView(FormView): f = open(path, 'w') f.write(img.read()) f.close() - command = '/usr/bin/dwebp ' + path + ' -o ' + dir + os.sep + 'preview.png &' + command = 'dwebp ' + path + ' -o ' + dir + os.sep + 'preview.png &' os.system(command) @method_decorator(login_required)