X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8a078a30db08afb680c48ce94d6e576236febeed..e3b9ec6181cd2ad092f909c9f72366e22d90cb7c:/src/experiments/experiments.py?ds=inline diff --git a/src/experiments/experiments.py b/src/experiments/experiments.py index e06d881bb..63c74c601 100644 --- a/src/experiments/experiments.py +++ b/src/experiments/experiments.py @@ -1,4 +1,5 @@ import re +from django.utils.translation import get_language from .base import Experiment @@ -7,9 +8,12 @@ class NewLayout(Experiment): name = 'Nowy layout strony' def qualify(self, request): + if get_language() != 'pl': + return False + if re.search( 'iphone|mobile|androidtouch', - request.META['HTTP_USER_AGENT'], + request.META.get('HTTP_USER_AGENT', ''), re.IGNORECASE): return False