New payment retry policy.
[wolnelektury.git] / src / experiments / experiments.py
1 import re
2 from django.utils.translation import get_language
3 from .base import Experiment
4
5
6 class NewLayout(Experiment):
7     slug = 'layout'
8     name = 'Nowy layout strony'
9
10     def qualify(self, request):
11         if get_language() != 'pl':
12             return False
13
14         if re.search(
15                 'iphone|mobile|androidtouch',
16                 request.META.get('HTTP_USER_AGENT', ''),
17                 re.IGNORECASE):
18             return False
19
20
21 experiments = [
22     NewLayout,
23 ]