fnp
/
wolnelektury.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Simplify transitional files a bit.
[wolnelektury.git]
/
src
/
experiments
/
middleware.py
1
from .experiments import experiments
2
3
4
def experiments_middleware(get_response):
5
def middleware(request):
6
exps = {}
7
8
for exp in experiments:
9
exps[exp.slug] = exp(request)
10
11
request.EXPERIMENTS = exps
12
response = get_response(request)
13
return response
14
15
return middleware