mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Removed current_app argument to render() and TemplateResponse().
Per deprecation timeline.
This commit is contained in:
parent
75374d3797
commit
5e450c52aa
15 changed files with 19 additions and 175 deletions
|
@ -109,19 +109,3 @@ def render_view_with_status(request):
|
|||
def render_view_with_using(request):
|
||||
using = request.GET.get('using')
|
||||
return render(request, 'shortcuts/using.html', using=using)
|
||||
|
||||
|
||||
def render_view_with_current_app(request):
|
||||
return render(request, 'shortcuts/render_test.html', {
|
||||
'foo': 'FOO',
|
||||
'bar': 'BAR',
|
||||
}, current_app="foobar_app")
|
||||
|
||||
|
||||
def render_view_with_current_app_conflict(request):
|
||||
# This should fail because we don't passing both a current_app and
|
||||
# context_instance:
|
||||
return render(request, 'shortcuts/render_test.html', {
|
||||
'foo': 'FOO',
|
||||
'bar': 'BAR',
|
||||
}, current_app="foobar_app", context_instance=RequestContext(request))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue