Fix
[wolnelektury.git] / src / experiments / views.py
1 from django.views.generic import TemplateView
2 from django.conf import settings
3
4
5 class MainSwitchView(TemplateView):
6     template_name = 'experiments/main_switch.html'
7
8     def get_context_data(self):
9         ctx = super().get_context_data()
10         ctx['experiments'] = [
11             {
12                 "config": conf,
13                 "value": self.request.EXPERIMENTS.get(conf['slug'])
14             }
15             for conf in settings.EXPERIMENTS
16         ]
17         return ctx