diff --git a/docs/api_stability.txt b/docs/api_stability.txt
index 769359b..9566e8f 100644
a
|
b
|
These APIs are stable:
|
59 | 59 | |
60 | 60 | - `Request/response objects`_. |
61 | 61 | |
62 | | - `Sending email`_. |
| 62 | - `Sending e-mail`_. |
63 | 63 | |
64 | 64 | - `Sessions`_. |
65 | 65 | |
… |
… |
change:
|
108 | 108 | .. _mod_python integration: ../modpython/ |
109 | 109 | .. _redirects: ../redirects/ |
110 | 110 | .. _request/response objects: ../request_response/ |
111 | | .. _sending email: ../email/ |
| 111 | .. _sending e-mail: ../email/ |
112 | 112 | .. _sessions: ../sessions/ |
113 | 113 | .. _settings: ../settings/ |
114 | 114 | .. _syndication: ../syndication_feeds/ |
diff --git a/docs/authentication.txt b/docs/authentication.txt
index cd76731..095e33c 100644
a
|
b
|
The page shown after a user has changed their password.
|
631 | 631 | **Description:** |
632 | 632 | |
633 | 633 | Allows a user to reset their password, and sends them the new password |
634 | | in an email. |
| 634 | in an e-mail. |
635 | 635 | |
636 | 636 | **Optional arguments:** |
637 | 637 | |
… |
… |
in an email.
|
640 | 640 | ``registration/password_reset_form.html`` if not supplied. |
641 | 641 | |
642 | 642 | * ``email_template_name``: The full name of a template to use for |
643 | | generating the email with the new password. This will default to |
| 643 | generating the e-mail with the new password. This will default to |
644 | 644 | ``registration/password_reset_email.html`` if not supplied. |
645 | 645 | |
646 | 646 | **Template context:** |
… |
… |
system provides several built-in forms:
|
696 | 696 | user to change their password. |
697 | 697 | |
698 | 698 | * ``django.contrib.auth.forms.PasswordResetForm``: A form for resetting a |
699 | | user's password and emailing the new password to them. |
| 699 | user's password and e-mailing the new password to them. |
700 | 700 | |
701 | 701 | * ``django.contrib.auth.forms.UserCreationForm``: A form for creating a |
702 | 702 | new user. |
diff --git a/docs/csrf.txt b/docs/csrf.txt
index 7d79e39..8d56e2f 100644
a
|
b
|
Cross Site Request Forgery protection
|
4 | 4 | |
5 | 5 | The CsrfMiddleware class provides easy-to-use protection against |
6 | 6 | `Cross Site Request Forgeries`_. This type of attack occurs when a malicious |
7 | | web site creates a link or form button that is intended to perform some action |
8 | | on your web site, using the credentials of a logged-in user who is tricked |
| 7 | Web site creates a link or form button that is intended to perform some action |
| 8 | on your Web site, using the credentials of a logged-in user who is tricked |
9 | 9 | into clicking on the link in their browser. |
10 | 10 | |
11 | 11 | The first defense against CSRF attacks is to ensure that GET requests |
… |
… |
CsrfMiddleware does two things:
|
38 | 38 | checks that the 'csrfmiddlewaretoken' is present and correct. If it |
39 | 39 | isn't, the user will get a 403 error. |
40 | 40 | |
41 | | This ensures that only forms that have originated from your web site |
| 41 | This ensures that only forms that have originated from your Web site |
42 | 42 | can be used to POST data back. |
43 | 43 | |
44 | 44 | It deliberately only targets HTTP POST requests (and the corresponding POST |
… |
… |
effects (see `9.1.1 Safe Methods, HTTP 1.1, RFC 2616`_), and so a
|
47 | 47 | CSRF attack with a GET request ought to be harmless. |
48 | 48 | |
49 | 49 | POST requests that are not accompanied by a session cookie are not protected, |
50 | | but they do not need to be protected, since the 'attacking' web site |
| 50 | but they do not need to be protected, since the 'attacking' Web site |
51 | 51 | could make these kind of requests anyway. |
52 | 52 | |
53 | 53 | The Content-Type is checked before modifying the response, and only |
… |
… |
it sends fragments of HTML in javascript document.write statements)
|
68 | 68 | you might bypass the filter that adds the hidden field to the form, |
69 | 69 | in which case form submission will always fail. It may still be possible |
70 | 70 | to use the middleware, provided you can find some way to get the |
71 | | CSRF token and ensure that is included when your form is submitted. |
72 | | No newline at end of file |
| 71 | CSRF token and ensure that is included when your form is submitted. |
diff --git a/docs/db-api.txt b/docs/db-api.txt
index 5fdcd94..4074932 100644
a
|
b
|
Be careful, if you are using ``extra()`` to add custom handling to your
|
463 | 463 | may or may not make sense. If you are using custom SQL fragments in your |
464 | 464 | ``extra()`` calls, Django will not inspect these fragments to see if they need |
465 | 465 | to be rewritten because of changes in the merged query. So test the effects |
466 | | carefully. Also realise that if you are combining two ``QuerySets`` with |
| 466 | carefully. Also realize that if you are combining two ``QuerySets`` with |
467 | 467 | ``|``, you cannot use ``extra(select=...)`` or ``extra(where=...)`` on *both* |
468 | 468 | ``QuerySets``. You can only use those calls on one or the other (Django will |
469 | 469 | raise a ``ValueError`` if you try to use this incorrectly). |
diff --git a/docs/django-admin.txt b/docs/django-admin.txt
index f5cc02e..71c4cf5 100644
a
|
b
|
makemessages
|
395 | 395 | |
396 | 396 | Runs over the entire source tree of the current directory and pulls out all |
397 | 397 | strings marked for translation. It creates (or updates) a message file in the |
398 | | conf/locale (in the django tree) or locale (for project and application) |
| 398 | conf/locale (in the Django tree) or locale (for project and application) |
399 | 399 | directory. After making changes to the messages files you need to compile them |
400 | 400 | with ``compilemessages`` for use with the builtin gettext support. See the |
401 | 401 | `i18n documentation`_ for details. |
diff --git a/docs/forms.txt b/docs/forms.txt
index 18d322a..5db3a9f 100644
a
|
b
|
created manipulators. But the coolness doesn't end there: You can easily create
|
373 | 373 | your own custom manipulators for handling custom forms. |
374 | 374 | |
375 | 375 | Custom manipulators are pretty simple. Here's a manipulator that you might use |
376 | | for a "contact" form on a website:: |
| 376 | for a "contact" form on a Web site:: |
377 | 377 | |
378 | 378 | from django import forms |
379 | 379 | |
diff --git a/docs/i18n.txt b/docs/i18n.txt
index c221b43..cce9d4e 100644
a
|
b
|
does translation:
|
888 | 888 | * The string domain is ``django`` or ``djangojs``. This string domain is |
889 | 889 | used to differentiate between different programs that store their data |
890 | 890 | in a common message-file library (usually ``/usr/share/locale/``). The |
891 | | ``django`` domain is used for python and template translation strings |
| 891 | ``django`` domain is used for Python and template translation strings |
892 | 892 | and is loaded into the global translation catalogs. The ``djangojs`` |
893 | 893 | domain is only used for JavaScript translation catalogs to make sure |
894 | 894 | that those are as small as possible. |
diff --git a/docs/install.txt b/docs/install.txt
index bfe85ff..cd21bd7 100644
a
|
b
|
Install Apache and mod_python
|
18 | 18 | ============================= |
19 | 19 | |
20 | 20 | If you just want to experiment with Django, skip ahead to the next |
21 | | section; Django includes a lightweight web server you can use for |
| 21 | section; Django includes a lightweight Web server you can use for |
22 | 22 | testing, so you won't need to set up Apache until you're ready to |
23 | 23 | deploy Django in production. |
24 | 24 | |
… |
… |
installed.
|
64 | 64 | You will also want to read the database-specific notes for the `MySQL backend`_. |
65 | 65 | |
66 | 66 | * If you're using SQLite and either Python 2.3 or Python 2.4, you'll need |
67 | | pysqlite_. Use version 2.0.3 or higher. Python 2.5 ships with an sqlite |
| 67 | pysqlite_. Use version 2.0.3 or higher. Python 2.5 ships with an SQLite |
68 | 68 | wrapper in the standard library, so you don't need to install anything extra |
69 | 69 | in that case. |
70 | 70 | |
diff --git a/docs/newforms.txt b/docs/newforms.txt
index 88b25be..c2448e5 100644
a
|
b
|
mentioned above (``required``, ``label``, ``initial``, ``widget``,
|
1596 | 1596 | Custom form and field validation |
1597 | 1597 | --------------------------------- |
1598 | 1598 | |
1599 | | Form validation happens when the data is cleaned. If you want to customise |
| 1599 | Form validation happens when the data is cleaned. If you want to customize |
1600 | 1600 | this process, there are various places you can change, each one serving a |
1601 | 1601 | different purpose. Three types of cleaning methods are run during form |
1602 | 1602 | processing. These are normally executed when you call the ``is_valid()`` |
… |
… |
directly), but normally they won't be needed.
|
1607 | 1607 | In general, any cleaning method can raise ``ValidationError`` if there is a |
1608 | 1608 | problem with the data it is processing, passing the relevant error message to |
1609 | 1609 | the ``ValidationError`` constructor. If no ``ValidationError`` is raised, the |
1610 | | method should return the cleaned (normalised) data as a Python object. |
| 1610 | method should return the cleaned (normalized) data as a Python object. |
1611 | 1611 | |
1612 | 1612 | If you detect multiple errors during a cleaning method and wish to signal all |
1613 | 1613 | of them to the form submitter, it is possible to pass a list of errors to the |
… |
… |
The three types of cleaning methods are:
|
1640 | 1640 | * The Form subclass's ``clean()`` method. This method can perform |
1641 | 1641 | any validation that requires access to multiple fields from the form at |
1642 | 1642 | once. This is where you might put in things to check that if field ``A`` |
1643 | | is supplied, field ``B`` must contain a valid email address and the |
| 1643 | is supplied, field ``B`` must contain a valid e-mail address and the |
1644 | 1644 | like. The data that this method returns is the final ``cleaned_data`` |
1645 | 1645 | attribute for the form, so don't forget to return the full list of |
1646 | 1646 | cleaned data if you override this method (by default, ``Form.clean()`` |
… |
… |
Customizing widget instances
|
1762 | 1762 | When Django renders a widget as HTML, it only renders the bare minimum |
1763 | 1763 | HTML - Django doesn't add a class definition, or any other widget-specific |
1764 | 1764 | attributes. This means that all 'TextInput' widgets will appear the same |
1765 | | on your web page. |
| 1765 | on your Web page. |
1766 | 1766 | |
1767 | 1767 | If you want to make one widget look different to another, you need to |
1768 | 1768 | specify additional attributes for each widget. When you specify a |
… |
… |
each widget will be rendered exactly the same::
|
1786 | 1786 | <tr><th>Url:</th><td><input type="text" name="url"/></td></tr> |
1787 | 1787 | <tr><th>Comment:</th><td><input type="text" name="comment" /></td></tr> |
1788 | 1788 | |
1789 | | On a real web page, you probably don't want every widget to look the same. You |
| 1789 | On a real Web page, you probably don't want every widget to look the same. You |
1790 | 1790 | might want a larger input element for the comment, and you might want the |
1791 | 1791 | 'name' widget to have some special CSS class. To do this, you specify a |
1792 | 1792 | custom widget for your fields, and specify some attributes to use |
diff --git a/docs/release_notes_0.95.txt b/docs/release_notes_0.95.txt
index f2ecbb6..a61b10d 100644
a
|
b
|
Problem reports and getting help
|
99 | 99 | ================================ |
100 | 100 | |
101 | 101 | Need help resolving a problem with Django? The documentation in the |
102 | | distribution is also available online_ at the `Django website`_. The FAQ_ |
| 102 | distribution is also available online_ at the `Django Web site`_. The FAQ_ |
103 | 103 | document is especially recommended, as it contains a number of issues that |
104 | 104 | come up time and again. |
105 | 105 | |
… |
… |
Django users and developers from around the world. Friendly people are usually
|
115 | 115 | available at any hour of the day -- to help, or just to chat. |
116 | 116 | |
117 | 117 | .. _online: http://www.djangoproject.com/documentation/0.95/ |
118 | | .. _Django website: http://www.djangoproject.com/ |
| 118 | .. _Django Web site: http://www.djangoproject.com/ |
119 | 119 | .. _FAQ: http://www.djangoproject.com/documentation/faq/ |
120 | 120 | .. _django-users: http://groups.google.com/group/django-users |
121 | 121 | |
diff --git a/docs/templates.txt b/docs/templates.txt
index 04a4658..a7f6a83 100644
a
|
b
|
information.
|
1945 | 1945 | django.contrib.webdesign |
1946 | 1946 | ------------------------ |
1947 | 1947 | |
1948 | | A collection of template tags that can be useful while designing a website, |
| 1948 | A collection of template tags that can be useful while designing a Web site, |
1949 | 1949 | such as a generator of Lorem Ipsum text. See the `webdesign documentation`_. |
1950 | 1950 | |
1951 | 1951 | .. _webdesign documentation: ../webdesign/ |
diff --git a/docs/tutorial03.txt b/docs/tutorial03.txt
index d49a417..2ac1062 100644
a
|
b
|
Here's what happens if a user goes to "/polls/34/" in this system:
|
441 | 441 | |
442 | 442 | * Django will find the match at ``'^polls/'`` |
443 | 443 | * It will strip off the matching text (``"polls/"``) and send the remaining |
444 | | text -- ``"34/"`` -- to the 'mysite.polls.urls' urlconf for |
| 444 | text -- ``"34/"`` -- to the 'mysite.polls.urls' URLconf for |
445 | 445 | further processing. |
446 | 446 | |
447 | 447 | Now that we've decoupled that, we need to decouple the |
448 | | 'mysite.polls.urls' urlconf by removing the leading "polls/" from each |
| 448 | 'mysite.polls.urls' URLconf by removing the leading "polls/" from each |
449 | 449 | line:: |
450 | 450 | |
451 | 451 | urlpatterns = patterns('mysite.polls.views', |
diff --git a/docs/url_dispatch.txt b/docs/url_dispatch.txt
index 7d67cd5..266e4a5 100644
a
|
b
|
Including other URLconfs
|
373 | 373 | At any point, your ``urlpatterns`` can "include" other URLconf modules. This |
374 | 374 | essentially "roots" a set of URLs below other ones. |
375 | 375 | |
376 | | For example, here's the URLconf for the `Django website`_ itself. It includes a |
| 376 | For example, here's the URLconf for the `Django Web site`_ itself. It includes a |
377 | 377 | number of other URLconfs:: |
378 | 378 | |
379 | 379 | from django.conf.urls.defaults import * |
… |
… |
Django encounters ``include()``, it chops off whatever part of the URL matched
|
390 | 390 | up to that point and sends the remaining string to the included URLconf for |
391 | 391 | further processing. |
392 | 392 | |
393 | | .. _`Django website`: http://www.djangoproject.com/ |
| 393 | .. _`Django Web site`: http://www.djangoproject.com/ |
394 | 394 | |
395 | 395 | Captured parameters |
396 | 396 | ------------------- |