From 3406643205bf2f47aa8d4e2eafa4c048910262ec Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Sun, 20 Jul 2014 21:12:21 +0200 Subject: [PATCH] only count medias and questions --- teleforma/views/pro.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 4d959d18..5278ebf0 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -108,6 +108,9 @@ class SeminarAccessMixin(object): return redirect('teleforma-desk') return super(SeminarAccessMixin, self).render_to_response(context) + +class SeminarRevisionMixin(object): + @jsonrpc_method('teleforma.seminar_load') def seminar_load(request, id, username): seminar = Seminar.objects.get(id=id) @@ -190,7 +193,7 @@ class SeminarsView(ListView): return all_seminars(self.request, date_order=True)['all_seminars'][:10] -class AnswerView(SeminarAccessMixin, FormView): +class AnswerView(SeminarAccessMixin, SeminarRevisionMixin, FormView): model = Answer form_class = AnswerForm @@ -254,7 +257,7 @@ class AnswerView(SeminarAccessMixin, FormView): return super(AnswerView, self).dispatch(*args, **kwargs) -class SeminarMediaView(SeminarAccessMixin, MediaView): +class SeminarMediaView(SeminarAccessMixin, SeminarRevisionMixin, MediaView): template_name = 'teleforma/seminar_media_video.html' -- 2.39.5