60d05213d8376cf5a517beb2b66b6f8dbd1cee9b
[wolnelektury.git] / src / experiments / experiments.py
1 import re
2 from django.conf import settings
3 from django.utils.translation import get_language
4 from .base import Experiment
5
6
7 class NewLayout(Experiment):
8     slug = 'layout'
9     name = 'Nowy layout strony'
10     size = settings.EXPERIMENTS_LAYOUT
11
12     def qualify(self, request):
13         if get_language() != 'pl':
14             return False
15
16
17 class Sowka(Experiment):
18     slug = 'sowka'
19     name = 'Pan Sówka'
20     size = settings.EXPERIMENTS_SOWKA
21     switchable = False
22
23
24 class Search(Experiment):
25     slug = 'search'
26     name = 'Nowa wyszukiwarka'
27     size = settings.EXPERIMENTS_SEARCH
28
29
30 experiments = [
31     NewLayout,
32     Sowka,
33     Search
34 ]