Skip to content

Commit 2508845

Browse files
committed
Fix l10n_render benchmark template rendering
1 parent b47a577 commit 2508845

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

djangobench/benchmarks/l10n_render/benchmark.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import sys
22

33
from django.core.handlers.wsgi import WSGIRequest
4-
from django.shortcuts import render_to_response
5-
from django.template import RequestContext
4+
from django.shortcuts import render
65

76
from djangobench.utils import run_benchmark
87

@@ -26,9 +25,8 @@ def make_request():
2625

2726

2827
def benchmark():
29-
context = RequestContext(req_object)
30-
context['numbers'] = range(0, 200)
31-
render_to_response('list.html', context)
28+
context = {'numbers': range(0, 200)}
29+
render(req_object, 'list.html', context)
3230

3331

3432
run_benchmark(

0 commit comments

Comments
 (0)