Revert "Allow template render to string helper functions to accept Context (#372)" (#377)

This reverts commit 64cbb0f70e.
This commit is contained in:
Pavel Savchenko
2020-06-01 13:34:21 +02:00
committed by GitHub
parent d5c1bfb12a
commit 570772f973
3 changed files with 3 additions and 20 deletions

View File

@@ -1,15 +0,0 @@
- case: loader_render_to_string_accepts_context
main: |
from django.http.request import HttpRequest
from django.shortcuts import render, render_to_response
from django.template.loader import render_to_string
from django.template import Context, RequestContext
request = HttpRequest()
request_context = RequestContext(request, {'foo': 'bar'})
render_to_string('foobar', {'foo': 'bar'})
render_to_string('foobar', Context({'foo': 'bar'}))
render_to_string('foobar', request_context)
render(request, '403.html', request_context, status=403)
render_to_response('403.html', request_context)