diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2013-08-09 14:17:30 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2013-08-09 14:17:30 +0100 |
| commit | de64c4d6e97c980fb4c0ace045fc4070b3f763d9 (patch) | |
| tree | 045c8af6a88fa964cf7e284970a6e93d53941a79 /docs/intro | |
| parent | fddc5957c53bd654312c4a238a8cdcfe5f4ef4cc (diff) | |
| parent | b575d690bbc1c4cd7f575346132c09fca8c736a7 (diff) | |
Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
django/core/management/commands/flush.py
django/core/management/commands/syncdb.py
django/db/models/loading.py
docs/internals/deprecation.txt
docs/ref/django-admin.txt
docs/releases/1.7.txt
Diffstat (limited to 'docs/intro')
| -rw-r--r-- | docs/intro/tutorial02.txt | 6 | ||||
| -rw-r--r-- | docs/intro/tutorial03.txt | 45 | ||||
| -rw-r--r-- | docs/intro/tutorial05.txt | 2 | ||||
| -rw-r--r-- | docs/intro/whatsnext.txt | 5 |
4 files changed, 6 insertions, 52 deletions
diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt index dd3e86d8ae..c5c5f8f288 100644 --- a/docs/intro/tutorial02.txt +++ b/docs/intro/tutorial02.txt @@ -352,12 +352,6 @@ representation of the output. You can improve that by giving that method (in :file:`polls/models.py`) a few attributes, as follows:: - import datetime - from django.utils import timezone - from django.db import models - - from polls.models import Poll - class Poll(models.Model): # ... def was_published_recently(self): diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt index f0c39e2c93..1165fbf18a 100644 --- a/docs/intro/tutorial03.txt +++ b/docs/intro/tutorial03.txt @@ -454,51 +454,6 @@ just as :func:`~django.shortcuts.get_object_or_404` -- except using :meth:`~django.db.models.query.QuerySet.get`. It raises :exc:`~django.http.Http404` if the list is empty. -Write a 404 (page not found) view -================================= - -When you raise :exc:`~django.http.Http404` from within a view, Django -will load a special view devoted to handling 404 errors. It finds it -by looking for the variable ``handler404`` in your root URLconf (and -only in your root URLconf; setting ``handler404`` anywhere else will -have no effect), which is a string in Python dotted syntax -- the same -format the normal URLconf callbacks use. A 404 view itself has nothing -special: It's just a normal view. - -You normally won't have to bother with writing 404 views. If you don't set -``handler404``, the built-in view :func:`django.views.defaults.page_not_found` -is used by default. Optionally, you can create a ``404.html`` template -in the root of your template directory. The default 404 view will then use that -template for all 404 errors when :setting:`DEBUG` is set to ``False`` (in your -settings module). If you do create the template, add at least some dummy -content like "Page not found". - -.. warning:: - - If :setting:`DEBUG` is set to ``False``, all responses will be - "Bad Request (400)" unless you specify the proper :setting:`ALLOWED_HOSTS` - as well (something like ``['localhost', '127.0.0.1']`` for - local development). - -A couple 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. - -* The 404 view is also called if Django doesn't find a match after checking - every regular expression in the URLconf. - -Write a 500 (server error) view -=============================== - -Similarly, your root URLconf may define a ``handler500``, which points -to a view to call in case of server errors. Server errors happen when -you have runtime errors in view code. - -Likewise, you should create a ``500.html`` template at the root of your -template directory and add some content like "Something went wrong". - Use the template system ======================= diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt index 39c3785f7c..63533d47ff 100644 --- a/docs/intro/tutorial05.txt +++ b/docs/intro/tutorial05.txt @@ -132,7 +132,7 @@ We identify a bug Fortunately, there's a little bug in the ``polls`` application for us to fix right away: the ``Poll.was_published_recently()`` method returns ``True`` if the ``Poll`` was published within the last day (which is correct) but also if -the ``Poll``'s ``pub_date`` field is in the future (which certainly isn't). +the ``Poll``’s ``pub_date`` field is in the future (which certainly isn't). You can see this in the Admin; create a poll whose date lies in the future; you'll see that the ``Poll`` change list claims it was published recently. diff --git a/docs/intro/whatsnext.txt b/docs/intro/whatsnext.txt index a677bc9efd..638d219afe 100644 --- a/docs/intro/whatsnext.txt +++ b/docs/intro/whatsnext.txt @@ -66,6 +66,11 @@ different needs: where you'll turn to find the details of a particular function or whathaveyou. +* If you are interested in deploying a project for public use, our docs have + :doc:`several guides</howto/deployment/index>` for various deployment + setups as well as a :doc:`deployment checklist</howto/deployment/checklist>` + for some things you'll need to think about. + * Finally, there's some "specialized" documentation not usually relevant to most developers. This includes the :doc:`release notes </releases/index>` and :doc:`internals documentation </internals/index>` for those who want to add |
