From 6442fd27bcf116d62ba5108436a28a3ed4df95e5 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 15 Apr 2006 16:46:54 +0000 Subject: magic-removal: Fixed #500 -- Removed TEMPLATE_FILE_EXTENSION setting so that template loading requires you to give the full filename, including extension. This applies everywhere, even in the 'extends' and 'include' template tags. git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2700 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/tutorial03.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'docs/tutorial03.txt') diff --git a/docs/tutorial03.txt b/docs/tutorial03.txt index 993c09c83d..ac70cb5642 100644 --- a/docs/tutorial03.txt +++ b/docs/tutorial03.txt @@ -90,7 +90,7 @@ Finally, it calls that ``detail()`` function like so:: The ``poll_id='23'`` part comes from ``(?P\d+)``. Using parenthesis around a pattern "captures" the text matched by that pattern and sends it as an argument -to the view function; the ``?P`` defines the name that will be used to +to the view function; the ``?P`` defines the name that will be used to identify the matched pattern; and \d+ is a regular experession to match a sequence of digits (i.e., a number). @@ -203,7 +203,7 @@ So let's use Django's template system to separate the design from Python:: def index(request): latest_poll_list = Poll.objects.all().order_by('-pub_date') - t = loader.get_template('polls/index') + t = loader.get_template('polls/index.html') c = Context({ 'latest_poll_list': latest_poll_list, }) @@ -227,9 +227,8 @@ find templates -- just as you did in the "Customize the admin look and feel" section of Tutorial 2. When you've done that, create a directory ``polls`` in your template directory. -Within that, create a file called ``index.html``. Django requires that -templates have ".html" extension. Note that our -``loader.get_template('polls/index')`` code from above maps to +Within that, create a file called ``index.html``. Note that our +``loader.get_template('polls/index.html')`` code from above maps to "[template_directory]/polls/index.html" on the filesystem. Put the following code in that template:: -- cgit v1.3