summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial03.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/intro/tutorial03.txt')
-rw-r--r--docs/intro/tutorial03.txt60
1 files changed, 30 insertions, 30 deletions
diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
index 23353a277a..2fd8927a66 100644
--- a/docs/intro/tutorial03.txt
+++ b/docs/intro/tutorial03.txt
@@ -13,31 +13,31 @@ A view is a "type" of Web page in your Django application that generally serves
a specific function and has a specific template. For example, in a Weblog
application, you might have the following views:
- * Blog homepage -- displays the latest few entries.
+* Blog homepage -- displays the latest few entries.
- * Entry "detail" page -- permalink page for a single entry.
+* Entry "detail" page -- permalink page for a single entry.
- * Year-based archive page -- displays all months with entries in the
- given year.
+* Year-based archive page -- displays all months with entries in the
+ given year.
- * Month-based archive page -- displays all days with entries in the
- given month.
+* Month-based archive page -- displays all days with entries in the
+ given month.
- * Day-based archive page -- displays all entries in the given day.
+* Day-based archive page -- displays all entries in the given day.
- * Comment action -- handles posting comments to a given entry.
+* Comment action -- handles posting comments to a given entry.
In our poll application, we'll have the following four views:
- * Poll "index" page -- displays the latest few polls.
+* Poll "index" page -- displays the latest few polls.
- * Poll "detail" page -- displays a poll question, with no results but
- with a form to vote.
+* Poll "detail" page -- displays a poll question, with no results but
+ with a form to vote.
- * Poll "results" page -- displays results for a particular poll.
+* Poll "results" page -- displays results for a particular poll.
- * Vote action -- handles voting for a particular choice in a particular
- poll.
+* Vote action -- handles voting for a particular choice in a particular
+ poll.
In Django, each view is represented by a simple Python function.
@@ -375,21 +375,21 @@ in ``django/conf/urls/defaults.py``, ``handler404`` is set to
Four more things to note about 404 views:
- * If :setting:`DEBUG` is set to ``True`` (in your settings module) then your
- 404 view will never be used (and thus the ``404.html`` template will never
- be rendered) because the traceback will be displayed instead.
+* If :setting:`DEBUG` is set to ``True`` (in your settings module) then your
+ 404 view will never be used (and thus the ``404.html`` template will never
+ be rendered) because the traceback will be displayed instead.
- * The 404 view is also called if Django doesn't find a match after checking
- every regular expression in the URLconf.
+* The 404 view is also called if Django doesn't find a match after checking
+ every regular expression in the URLconf.
- * If you don't define your own 404 view -- and simply use the default, which
- is recommended -- you still have one obligation: To create a ``404.html``
- template in the root of your template directory. The default 404 view will
- use that template for all 404 errors.
+* If you don't define your own 404 view -- and simply use the default, which
+ is recommended -- you still have one obligation: To create a ``404.html``
+ template in the root of your template directory. The default 404 view will
+ use that template for all 404 errors.
- * If :setting:`DEBUG` is set to ``False`` (in your settings module) and if
- you didn't create a ``404.html`` file, an ``Http500`` is raised instead.
- So remember to create a ``404.html``.
+* If :setting:`DEBUG` is set to ``False`` (in your settings module) and if
+ you didn't create a ``404.html`` file, an ``Http500`` is raised instead.
+ So remember to create a ``404.html``.
Write a 500 (server error) view
===============================
@@ -517,11 +517,11 @@ URLconf for further processing.
Here's what happens if a user goes to "/polls/34/" in this system:
- * Django will find the match at ``'^polls/'``
+* Django will find the match at ``'^polls/'``
- * Then, Django will strip off the matching text (``"polls/"``) and send the
- remaining text -- ``"34/"`` -- to the 'polls.urls' URLconf for
- further processing.
+* Then, Django will strip off the matching text (``"polls/"``) and send the
+ remaining text -- ``"34/"`` -- to the 'polls.urls' URLconf for
+ further processing.
Now that we've decoupled that, we need to decouple the ``polls.urls``
URLconf by removing the leading "polls/" from each line, and removing the