diff options
| author | Boulder Sprinters <boulder-sprinters@djangoproject.com> | 2007-02-02 17:35:55 +0000 |
|---|---|---|
| committer | Boulder Sprinters <boulder-sprinters@djangoproject.com> | 2007-02-02 17:35:55 +0000 |
| commit | e17f75551491f5b864c1fc8a97c21d0b2bbf0bcd (patch) | |
| tree | 49a5a779e1278eca17fffe81a83fce55fb35ce46 /docs/tutorial03.txt | |
| parent | 92b7851424069336f76112932682c77a6a1e3cb9 (diff) | |
boulder-oracle-sprint: Merged to trunk [4455].
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/tutorial03.txt')
| -rw-r--r-- | docs/tutorial03.txt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/docs/tutorial03.txt b/docs/tutorial03.txt index 41d11d9e6e..17b6ec0c68 100644 --- a/docs/tutorial03.txt +++ b/docs/tutorial03.txt @@ -5,7 +5,7 @@ Writing your first Django app, part 3 This tutorial begins where `Tutorial 2`_ left off. We're continuing the Web-poll application and will focus on creating the public interface -- "views." -.. _Tutorial 2: http://www.djangoproject.com/documentation/tutorial2/ +.. _Tutorial 2: ../tutorial2/ Philosophy ========== @@ -117,8 +117,8 @@ time the URLconf module is loaded. They're super fast. .. _Wikipedia's entry: http://en.wikipedia.org/wiki/Regular_expression .. _Python documentation: http://www.python.org/doc/current/lib/module-re.html -.. _request and response documentation: http://www.djangoproject.com/documentation/request_response/ -.. _URLconf documentation: http://www.djangoproject.com/documentation/url_dispatch/ +.. _request and response documentation: ../request_response/ +.. _URLconf documentation: ../url_dispatch/ Write your first view ===================== @@ -260,8 +260,7 @@ provides a shortcut. Here's the full ``index()`` view, rewritten:: latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5] return render_to_response('polls/index.html', {'latest_poll_list': latest_poll_list}) -Note that we no longer need to import ``loader``, ``Context`` or -``HttpResponse``. +Note that once we've done this in all these views, we no longer need to import ``loader``, ``Context`` and ``HttpResponse``. The ``render_to_response()`` function takes a template name as its first argument and a dictionary as its optional second argument. It returns an @@ -377,7 +376,7 @@ iterable of Choice objects and is suitable for use in the ``{% for %}`` tag. See the `template guide`_ for full details on how templates work. -.. _template guide: http://www.djangoproject.com/documentation/templates/ +.. _template guide: ../templates/ Simplifying the URLconfs ======================== @@ -464,4 +463,4 @@ All the poll app cares about is its relative URLs, not its absolute URLs. When you're comfortable with writing views, read `part 4 of this tutorial`_ to learn about simple form processing and generic views. -.. _part 4 of this tutorial: http://www.djangoproject.com/documentation/tutorial4/ +.. _part 4 of this tutorial: ../tutorial4/ |
