summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2008-01-17 18:12:24 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2008-01-17 18:12:24 +0000
commitdaa467d79ec7b40e376294eabc51222a67690181 (patch)
treea91a72f3c10e95bf5c59a2599c0d370ddc8c78dc /docs
parentc080e441f347ad252be5e2d4dc56e9f43fce88cc (diff)
newforms-admin: Merged from trunk up to [7021].
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/design_philosophies.txt2
-rw-r--r--docs/distributions.txt20
-rw-r--r--docs/django-admin.txt4
-rw-r--r--docs/localflavor.txt4
-rw-r--r--docs/middleware.txt11
-rw-r--r--docs/shortcuts.txt4
-rw-r--r--docs/sites.txt6
-rw-r--r--docs/syndication_feeds.txt2
-rw-r--r--docs/templates.txt9
-rw-r--r--docs/templates_python.txt6
10 files changed, 43 insertions, 25 deletions
diff --git a/docs/design_philosophies.txt b/docs/design_philosophies.txt
index 72aa8ade95..aae0fa836e 100644
--- a/docs/design_philosophies.txt
+++ b/docs/design_philosophies.txt
@@ -57,7 +57,7 @@ worth using only if it creates a huge convenience unattainable in other ways,
and it isn't implemented in a way that confuses developers who are trying to
learn how to use the feature.
-.. _`core Python principle`: http://www.python.org/doc/Humor.html#zen
+.. _`core Python principle`: http://www.python.org/dev/peps/pep-0020/
Consistency
-----------
diff --git a/docs/distributions.txt b/docs/distributions.txt
index d65e047276..48c30c7068 100644
--- a/docs/distributions.txt
+++ b/docs/distributions.txt
@@ -18,9 +18,9 @@ repository.
FreeBSD
=======
-The `FreeBSD`_ ports system offers both Django 0.96 (`py-django`_) and a more
-recent, but not current, version based on Django's trunk (`py-django-devel`_).
-These are installed in the normal FreeBSD way; for Django 0.96, for example, type:
+The `FreeBSD`_ ports system offers both Django 0.96 (`py-django`_) and a more
+recent, but not current, version based on Django's trunk (`py-django-devel`_).
+These are installed in the normal FreeBSD way; for Django 0.96, for example, type:
``cd /usr/ports/www/py-django && sudo make install clean``.
.. _FreeBSD: http://www.freebsd.org/
@@ -60,22 +60,22 @@ point to find their preferred version.
Gentoo
------
-A Django build is available for `Gentoo Linux`_, and is based on Django 0.96.
-The `current Gentoo build`_ can be installed by typing ``emerge django``.
+A Django package is available for `Gentoo Linux`_, and is based on Django 0.96.1.
+The `current Gentoo package`_ can be installed by typing ``emerge django``.
.. _Gentoo Linux: http://www.gentoo.org/
-.. _current Gentoo build: http://packages.gentoo.org/packages/?category=dev-python;name=django
+.. _current Gentoo package: http://packages.gentoo.org/package/django
Ubuntu
------
The Debian ``python-django`` package is also available for `Ubuntu Linux`_, in
-the "universe" repository for Ubuntu 7.04 ("Feisty Fawn"). The `current Ubuntu
-package`_ is also based on Django 0.95.1 and can be installed in the same
-fashion as for Debian.
+the "universe" repository for Ubuntu 7.10 ("Gutsy Gibbon"). The `current Ubuntu
+package`_ is based on Django 0.96.1 and can be installed in the same fashion as
+for Debian.
.. _Ubuntu Linux: http://www.ubuntu.com/
-.. _current Ubuntu package: http://packages.ubuntu.com/feisty/python/python-django
+.. _current Ubuntu package: http://packages.ubuntu.com/gutsy/python/python-django
Mac OS X
diff --git a/docs/django-admin.txt b/docs/django-admin.txt
index fe43f9586c..21821ab2e9 100644
--- a/docs/django-admin.txt
+++ b/docs/django-admin.txt
@@ -716,8 +716,8 @@ in Python package syntax, e.g. ``mysite.settings``. If this isn't provided,
``django-admin.py`` will use the ``DJANGO_SETTINGS_MODULE`` environment
variable.
-Note that this option is unnecessary in ``manage.py``, because it takes care of
-setting ``DJANGO_SETTINGS_MODULE`` for you.
+Note that this option is unnecessary in ``manage.py``, because it uses
+``settings.py`` from the current project by default.
Extra niceties
==============
diff --git a/docs/localflavor.txt b/docs/localflavor.txt
index 154922ff45..75ec95382e 100644
--- a/docs/localflavor.txt
+++ b/docs/localflavor.txt
@@ -100,6 +100,8 @@ any code you'd like to contribute. One thing we ask is that you please use
Unicode objects (``u'mystring'``) for strings, rather than setting the encoding
in the file. See any of the existing flavors for examples.
+.. _create a ticket: http://code.djangoproject.com/simpleticket
+
Argentina (``django.contrib.localflavor.ar``)
=============================================
@@ -181,7 +183,7 @@ CASocialInsuranceNumberField
----------------------------
A form field that validates input as a Canadian Social Insurance Number (SIN).
-A valid number must have the format XXX-XXX-XXXX and pass a `Luhn mod-10
+A valid number must have the format XXX-XXX-XXX and pass a `Luhn mod-10
checksum`_.
.. _Luhn mod-10 checksum: http://en.wikipedia.org/wiki/Luhn_algorithm
diff --git a/docs/middleware.txt b/docs/middleware.txt
index f2cf18dbdf..a2853e2965 100644
--- a/docs/middleware.txt
+++ b/docs/middleware.txt
@@ -154,6 +154,17 @@ every incoming ``HttpRequest`` object. See `Authentication in Web requests`_.
.. _Authentication in Web requests: ../authentication/#authentication-in-web-requests
+django.contrib.csrf.middleware.CsrfMiddleware
+---------------------------------------------
+
+**New in Django development version**
+
+Adds protection against Cross Site Request Forgeries by adding hidden form
+fields to POST forms and checking requests for the correct value. See the
+`Cross Site Request Forgery protection documentation`_.
+
+.. _`Cross Site Request Forgery protection documentation`: ../csrf/
+
django.middleware.transaction.TransactionMiddleware
---------------------------------------------------
diff --git a/docs/shortcuts.txt b/docs/shortcuts.txt
index f94babfecb..19eac4be6d 100644
--- a/docs/shortcuts.txt
+++ b/docs/shortcuts.txt
@@ -94,7 +94,7 @@ This example is equivalent to::
def my_view(request):
try:
- my_object = MyModel.object.get(pk=1)
+ my_object = MyModel.objects.get(pk=1)
except MyModel.DoesNotExist:
raise Http404
@@ -136,7 +136,7 @@ This example is equivalent to::
from django.http import Http404
def my_view(request):
- my_objects = MyModels.object.filter(published=True)
+ my_objects = MyModel.objects.filter(published=True)
if not my_objects:
raise Http404
diff --git a/docs/sites.txt b/docs/sites.txt
index 5896afcf41..9516b43995 100644
--- a/docs/sites.txt
+++ b/docs/sites.txt
@@ -97,7 +97,7 @@ Hooking into the current site from views
----------------------------------------
On a lower level, you can use the sites framework in your Django views to do
-particular things based on what site in which the view is being called.
+particular things based on the site in which the view is being called.
For example::
from django.conf import settings
@@ -330,13 +330,13 @@ Here's how Django uses the sites framework:
retrieving flatpages to display.
* In the `syndication framework`_, the templates for ``title`` and
- ``description`` automatically have access to a variable ``{{{ site }}}``,
+ ``description`` automatically have access to a variable ``{{ site }}``,
which is the ``Site`` object representing the current site. Also, the
hook for providing item URLs will use the ``domain`` from the current
``Site`` object if you don't specify a fully-qualified domain.
* In the `authentication framework`_, the ``django.contrib.auth.views.login``
- view passes the current ``Site`` name to the template as ``{{{ site_name }}}``.
+ view passes the current ``Site`` name to the template as ``{{ site_name }}``.
* The shortcut view (``django.views.defaults.shortcut``) uses the domain of
the current ``Site`` object when calculating an object's URL.
diff --git a/docs/syndication_feeds.txt b/docs/syndication_feeds.txt
index b3edf4c008..ebd6af26f8 100644
--- a/docs/syndication_feeds.txt
+++ b/docs/syndication_feeds.txt
@@ -201,7 +201,7 @@ the feed.
An example makes this clear. Here's the code for these beat-specific feeds::
- from django.contrib.syndication import FeedDoesNotExist
+ from django.contrib.syndication.feeds import FeedDoesNotExist
class BeatFeed(Feed):
def get_object(self, bits):
diff --git a/docs/templates.txt b/docs/templates.txt
index ffda321512..c351c951c9 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -953,7 +953,7 @@ Available format strings:
U Not implemented.
w Day of the week, digits without ``'0'`` (Sunday) to ``'6'`` (Saturday)
leading zeros.
- W ISO-8601 week number of year, with ``1``, ``23``
+ W ISO-8601 week number of year, with ``1``, ``53``
weeks starting on Monday.
y Year, 2 digits. ``'99'``
Y Year, 4 digits. ``'1999'``
@@ -1230,7 +1230,7 @@ addslashes
Adds slashes before quotes. Useful for escaping strings in CSV, for example.
**New in Django development version**: for escaping data in JavaScript strings,
-use the `escapejs` filter instead.
+use the `escapejs`_ filter instead.
capfirst
~~~~~~~~
@@ -1403,6 +1403,11 @@ join
Joins a list with a string, like Python's ``str.join(list)``.
+last
+~~~~
+
+Returns the last item in a list.
+
length
~~~~~~
diff --git a/docs/templates_python.txt b/docs/templates_python.txt
index 014a853a41..f98cfa3249 100644
--- a/docs/templates_python.txt
+++ b/docs/templates_python.txt
@@ -823,11 +823,11 @@ Template filter code falls into one of two situations:
can operate in templates where auto-escaping is either on or off in
order to make things easier for your template authors.
- In order for you filter to know the current auto-escaping state, set the
- ``needs_autoescape`` attribute to ``True`` on your function. (If you
+ In order for your filter to know the current auto-escaping state, set
+ the ``needs_autoescape`` attribute to ``True`` on your function. (If you
don't specify this attribute, it defaults to ``False``). This attribute
tells Django that your filter function wants to be passed an extra
- keyword argument, called ``autoescape``, that is ``True`` is
+ keyword argument, called ``autoescape``, that is ``True`` if
auto-escaping is in effect and ``False`` otherwise.
For example, let's write a filter that emphasizes the first character of