Ignore everything between {% comment %} and {% endcomment %}

Copy template files under

contrib/comments/templates/comments

into your default template directory.

Change your template files. Template loader will find files first at your default template directory.

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

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