fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Overdue fix.
[wolnelektury.git]
/
src
/
experiments
/
experiments.py
diff --git
a/src/experiments/experiments.py
b/src/experiments/experiments.py
index
e06d881
..
63c74c6
100644
(file)
--- a/
src/experiments/experiments.py
+++ b/
src/experiments/experiments.py
@@
-1,4
+1,5
@@
import re
import re
+from django.utils.translation import get_language
from .base import Experiment
from .base import Experiment
@@
-7,9
+8,12
@@
class NewLayout(Experiment):
name = 'Nowy layout strony'
def qualify(self, request):
name = 'Nowy layout strony'
def qualify(self, request):
+ if get_language() != 'pl':
+ return False
+
if re.search(
'iphone|mobile|androidtouch',
if re.search(
'iphone|mobile|androidtouch',
- request.META
['HTTP_USER_AGENT']
,
+ request.META
.get('HTTP_USER_AGENT', '')
,
re.IGNORECASE):
return False
re.IGNORECASE):
return False