Loading tests/shortcuts/urls.py +0 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ urlpatterns = [ url(r'^render_to_response/content_type/$', views.render_to_response_view_with_content_type), url(r'^render_to_response/status/$', views.render_to_response_view_with_status), url(r'^render_to_response/using/$', views.render_to_response_view_with_using), url(r'^render_to_response/context_instance_misuse/$', views.render_to_response_with_context_instance_misuse), url(r'^render/$', views.render_view), url(r'^render/multiple_templates/$', views.render_view_with_multiple_templates), url(r'^render/content_type/$', views.render_view_with_content_type), Loading tests/shortcuts/views.py +0 −7 Original line number Diff line number Diff line from django.shortcuts import render, render_to_response from django.template import RequestContext def render_to_response_view(request): Loading Loading @@ -42,12 +41,6 @@ def context_processor(request): return {'bar': 'context processor output'} def render_to_response_with_context_instance_misuse(request): context_instance = RequestContext(request, {}, processors=[context_processor]) # Incorrect -- context_instance should be passed as a keyword argument. return render_to_response('shortcuts/render_test.html', context_instance) def render_view(request): return render(request, 'shortcuts/render_test.html', { 'foo': 'FOO', Loading Loading
tests/shortcuts/urls.py +0 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ urlpatterns = [ url(r'^render_to_response/content_type/$', views.render_to_response_view_with_content_type), url(r'^render_to_response/status/$', views.render_to_response_view_with_status), url(r'^render_to_response/using/$', views.render_to_response_view_with_using), url(r'^render_to_response/context_instance_misuse/$', views.render_to_response_with_context_instance_misuse), url(r'^render/$', views.render_view), url(r'^render/multiple_templates/$', views.render_view_with_multiple_templates), url(r'^render/content_type/$', views.render_view_with_content_type), Loading
tests/shortcuts/views.py +0 −7 Original line number Diff line number Diff line from django.shortcuts import render, render_to_response from django.template import RequestContext def render_to_response_view(request): Loading Loading @@ -42,12 +41,6 @@ def context_processor(request): return {'bar': 'context processor output'} def render_to_response_with_context_instance_misuse(request): context_instance = RequestContext(request, {}, processors=[context_processor]) # Incorrect -- context_instance should be passed as a keyword argument. return render_to_response('shortcuts/render_test.html', context_instance) def render_view(request): return render(request, 'shortcuts/render_test.html', { 'foo': 'FOO', Loading