diff options
| author | Jannis Leidel | 2013-10-18 09:25:19 -0700 |
|---|---|---|
| committer | Jannis Leidel | 2013-10-18 09:25:19 -0700 |
| commit | 23dcd933dbad085e4c8436b40233fe0b09320285 (patch) | |
| tree | 19cee7604c32f8413a695d9f423cdb410d8d186e /debug_toolbar/views.py | |
| parent | ccbf178a3351106e25422b898f09cdca60a1c6e5 (diff) | |
| parent | a53e0b90af2642eed208de3052d60ba6cf9994b9 (diff) | |
| download | django-debug-toolbar-23dcd933dbad085e4c8436b40233fe0b09320285.tar.bz2 | |
Merge pull request #413 from aaugustin/use-request-context
Use render() to render with a RequestContext.
Diffstat (limited to 'debug_toolbar/views.py')
| -rw-r--r-- | debug_toolbar/views.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/debug_toolbar/views.py b/debug_toolbar/views.py index f625224..922d4db 100644 --- a/debug_toolbar/views.py +++ b/debug_toolbar/views.py @@ -7,7 +7,7 @@ views in any other way is generally not advised. from __future__ import unicode_literals from django.http import HttpResponseBadRequest -from django.shortcuts import render_to_response +from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from debug_toolbar.forms import SQLSelectForm @@ -33,7 +33,7 @@ def sql_select(request): 'headers': headers, 'alias': form.cleaned_data['alias'], } - return render_to_response('debug_toolbar/panels/sql_select.html', context) + return render(request, 'debug_toolbar/panels/sql_select.html', context) return HttpResponseBadRequest('Form errors') @@ -70,7 +70,7 @@ def sql_explain(request): 'headers': headers, 'alias': form.cleaned_data['alias'], } - return render_to_response('debug_toolbar/panels/sql_explain.html', context) + return render(request, 'debug_toolbar/panels/sql_explain.html', context) return HttpResponseBadRequest('Form errors') @@ -105,7 +105,7 @@ def sql_profile(request): 'headers': headers, 'alias': form.cleaned_data['alias'], } - return render_to_response('debug_toolbar/panels/sql_profile.html', context) + return render(request, 'debug_toolbar/panels/sql_profile.html', context) return HttpResponseBadRequest('Form errors') @@ -147,7 +147,7 @@ def template_source(request): except ImportError: pass - return render_to_response('debug_toolbar/panels/template_source.html', { + return render(request, 'debug_toolbar/panels/template_source.html', { 'source': source, 'template_name': template_name }) |
