﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18498	you still need to import http response after changing to render_to_response as a shortcut	anonymous	nobody	"you still need to import http response after changing to render_to_response as a shortcut. The documentation for part 3 says the opposite:

""It's a very common idiom to load a template, fill a context and return an HttpResponse object with the result of the rendered template. Django provides a shortcut. Here's the full index() view, rewritten:

from django.shortcuts import render_to_response
from polls.models import Poll

def index(request):
    latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
    return render_to_response('polls/index.html', {'latest_poll_list': latest_poll_list})
Note that once we've done this in all these views, we no longer need to import loader, Context and HttpResponse.

The render_to_response() function takes a template name as its first argument and a dictionary as its optional second argument. It returns an HttpResponse object of the given template rendered with the given context.""

The other views (detail, results, vote) all use HttpResponse. If we no longer import httpresponse, the code will not run"	Uncategorized	closed	Documentation	1.4	Normal	worksforme			Unreviewed	0	0	0	0	0	0
