Direct to Template

URLconf ( is the mapping between urls and functions ( When the user click triggers the url the function will be executed, prepares the data (e.g. by fetching from a database) and returns always a HttpResponse object which can use a template. direct_to_template allows to omit the function and directly tell which page to go: ::

from django.conf.urls.defaults import patterns, url
from django.views.generic.simple import direct_to_template

urlpatterns = patterns('',
    url(^about/$', direct_to_template, {'template': about.html'})

Edit post (Admin)

Comment on This Data Unit