X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/1249091e84840ca27aa6047db36c8e899328f15c..a9226097c8eea0591fd3249f62a71becc6d2be93:/src/experiments/views.py?ds=sidebyside diff --git a/src/experiments/views.py b/src/experiments/views.py index 001b32a7f..50c6f1e94 100644 --- a/src/experiments/views.py +++ b/src/experiments/views.py @@ -3,3 +3,11 @@ from django.views.generic import TemplateView class MainSwitchView(TemplateView): template_name = 'experiments/main_switch.html' + + def get_context_data(self): + return { + 'experiments': [ + e for e in self.request.EXPERIMENTS.values() + if e.switchable or self.request.user.is_staff + ] + }