Working menu.
[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         if re.search(
17                 'iphone|mobile|androidtouch',
18                 request.META.get('HTTP_USER_AGENT', ''),
19                 re.IGNORECASE):
20             return False
21
22
23 experiments = [
24     NewLayout,
25 ]