It performs three functions.

1. load the template

2. render the output

3. create the HttpResponse

e.g., In views.py

————-

from django.shortcuts import render_to_response

def home_page(request):

return render_to_response(‘home.html’,
{‘card_list’:Card.objects.all(), ‘user’: request.user})

——–

home.html

is the name of the template file

{‘card_list’:Card.objects.all(), ‘user’: request.user}

is the Context to pass to the home.html

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2011 Web Oom Suffusion theme by Sayontan Sinha
Switch to our mobile site
Top Footer