From: Guillaume Pellerin Date: Thu, 25 Jan 2018 23:28:46 +0000 (+0100) Subject: Script service URL in settings:wq X-Git-Tag: 1.2~10^2~8 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=12cd09bb7f9cfef606dd0dbc4e32d43003d4bdd5;p=teleforma.git Script service URL in settings:wq --- diff --git a/teleforma/exam/templates/exam/script_detail.html b/teleforma/exam/templates/exam/script_detail.html index d18fc5cb..7e27aba6 100644 --- a/teleforma/exam/templates/exam/script_detail.html +++ b/teleforma/exam/templates/exam/script_detail.html @@ -123,7 +123,7 @@

-
diff --git a/teleforma/exam/views.py b/teleforma/exam/views.py index 5c2f7592..4e847395 100644 --- a/teleforma/exam/views.py +++ b/teleforma/exam/views.py @@ -19,6 +19,7 @@ class ScriptMixinView(View): context = super(ScriptMixinView, self).get_context_data(**kwargs) self.period = Period.objects.get(id=self.kwargs['period_id']) context['period'] = self.period + context['script_service_url'] = getattr(settings, 'TELEFORMA_EXAM_SCRIPT_SERVICE_URL' if getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True) and self.period.date_exam_end: context['upload'] = datetime.datetime.now() <= self.period.date_exam_end else: