Fixed #14141: docs now use the :doc: construct for links between documents.

Thanks, Ramiro Morales.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2010-08-19 19:27:44 +00:00
parent a352154e42
commit 728effcfbd
181 changed files with 1222 additions and 1525 deletions

View file

@ -1,10 +1,8 @@
.. _intro-tutorial04:
=====================================
Writing your first Django app, part 4
=====================================
This tutorial begins where :ref:`Tutorial 3 <intro-tutorial03>` left off. We're
This tutorial begins where :doc:`Tutorial 3 </intro/tutorial03>` left off. We're
continuing the Web-poll application and will focus on simple form processing and
cutting down our code.
@ -70,7 +68,7 @@ The details of how this works are explained in the documentation for
:ref:`RequestContext <subclassing-context-requestcontext>`.
Now, let's create a Django view that handles the submitted data and does
something with it. Remember, in :ref:`Tutorial 3 <intro-tutorial03>`, we
something with it. Remember, in :doc:`Tutorial 3 </intro/tutorial03>`, we
created a URLconf for the polls application that includes this line::
(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
@ -149,7 +147,7 @@ This code includes a few things we haven't covered yet in this tutorial:
As mentioned in Tutorial 3, ``request`` is a :class:`~django.http.HttpRequest`
object. For more on :class:`~django.http.HttpRequest` objects, see the
:ref:`request and response documentation <ref-request-response>`.
:doc:`request and response documentation </ref/request-response>`.
After somebody votes in a poll, the ``vote()`` view redirects to the results
page for the poll. Let's write that view::
@ -158,8 +156,8 @@ page for the poll. Let's write that view::
p = get_object_or_404(Poll, pk=poll_id)
return render_to_response('polls/results.html', {'poll': p})
This is almost exactly the same as the ``detail()`` view from :ref:`Tutorial 3
<intro-tutorial03>`. The only difference is the template name. We'll fix this
This is almost exactly the same as the ``detail()`` view from :doc:`Tutorial 3
</intro/tutorial03>`. The only difference is the template name. We'll fix this
redundancy later.
Now, create a ``results.html`` template:
@ -183,7 +181,7 @@ without having chosen a choice, you should see the error message.
Use generic views: Less code is better
======================================
The ``detail()`` (from :ref:`Tutorial 3 <intro-tutorial03>`) and ``results()``
The ``detail()`` (from :doc:`Tutorial 3 </intro/tutorial03>`) and ``results()``
views are stupidly simple -- and, as mentioned above, redundant. The ``index()``
view (also from Tutorial 3), which displays a list of polls, is similar.
@ -328,8 +326,8 @@ are) used multiple times -- but we can use the name we've given::
Run the server, and use your new polling app based on generic views.
For full details on generic views, see the :ref:`generic views documentation
<topics-http-generic-views>`.
For full details on generic views, see the :doc:`generic views documentation
</topics/http/generic-views>`.
Coming soon
===========
@ -344,5 +342,5 @@ will cover:
* Advanced admin features: Permissions
* Advanced admin features: Custom JavaScript
In the meantime, you might want to check out some pointers on :ref:`where to go
from here <intro-whatsnext>`
In the meantime, you might want to check out some pointers on :doc:`where to go
from here </intro/whatsnext>`