diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-04-15 16:46:54 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-04-15 16:46:54 +0000 |
| commit | 6442fd27bcf116d62ba5108436a28a3ed4df95e5 (patch) | |
| tree | f009cbf6b31afe163e01d3e75f614427ea7f6100 /docs/tutorial03.txt | |
| parent | 39d42d48618efbb5e5176a8b65b635a84bed45a5 (diff) | |
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
Diffstat (limited to 'docs/tutorial03.txt')
| -rw-r--r-- | docs/tutorial03.txt | 9 |
1 files changed, 4 insertions, 5 deletions
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<poll_id>\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<poll_id>`` defines the name that will be used to +to the view function; the ``?P<poll_id>`` 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:: |
