summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJason Pellerin <jpellerin@gmail.com>2006-12-04 18:16:40 +0000
committerJason Pellerin <jpellerin@gmail.com>2006-12-04 18:16:40 +0000
commite07dae7b77abc39d3e5d99dece5d43a5b99890f4 (patch)
tree3f29507bf4541e6657b8bc7c635673e2f8acea06 /docs
parent261fb45ba8ce5ad7c9a0a73c286077c779364b8d (diff)
[multi-db] Merged trunk to [3890]
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@4152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/admin_css.txt4
-rw-r--r--docs/api_stability.txt4
-rw-r--r--docs/authentication.txt27
-rw-r--r--docs/faq.txt2
-rw-r--r--docs/forms.txt2
-rw-r--r--docs/release_notes_0.95.txt2
-rw-r--r--docs/settings.txt9
-rw-r--r--docs/templates.txt7
-rw-r--r--docs/templates_python.txt2
-rw-r--r--docs/testing.txt6
-rw-r--r--docs/tutorial03.txt2
-rw-r--r--docs/tutorial04.txt2
12 files changed, 38 insertions, 31 deletions
diff --git a/docs/admin_css.txt b/docs/admin_css.txt
index ec402f7142..5822e26e45 100644
--- a/docs/admin_css.txt
+++ b/docs/admin_css.txt
@@ -82,7 +82,7 @@ There are also a few styles for styling text.
.help
This is a custom class for blocks of inline help text explaining the
function of form elements. It makes text smaller and gray, and when applied
- to ``p`` elements withing ``.form-row`` elements (see Form Styles below),
+ to ``p`` elements within ``.form-row`` elements (see Form Styles below),
it will offset the text to align with the form field. Use this for help
text, instead of ``small quiet``. It works on other elements, but try to
put the class on a ``p`` whenever you can.
@@ -170,4 +170,4 @@ Labels
Form labels should always precede the field, except in the case
of checkboxes and radio buttons, where the ``input`` should come first. Any
explanation or help text should follow the ``label`` in a ``p`` with class
-``.help``. \ No newline at end of file
+``.help``.
diff --git a/docs/api_stability.txt b/docs/api_stability.txt
index a9d6904735..18885fbe63 100644
--- a/docs/api_stability.txt
+++ b/docs/api_stability.txt
@@ -82,7 +82,7 @@ that 90% of Django can be considered forwards-compatible at this point.
That said, these APIs should *not* be considered stable, and are likely to
change:
- - `Forms and validation`_ will most likely be compeltely rewritten to
+ - `Forms and validation`_ will most likely be completely rewritten to
deemphasize Manipulators in favor of validation-aware models.
- `Serialization`_ is under heavy development; changes are likely.
@@ -91,7 +91,7 @@ change:
API changes may be necessary.
- Generic relations will most likely be moved out of core and into the
- content-types contrib package to avoid core dependacies on optional
+ content-types contrib package to avoid core dependancies on optional
components.
- The comments framework, which is yet undocumented, will likely get a complete
diff --git a/docs/authentication.txt b/docs/authentication.txt
index 6d345adaec..2a61ec82b5 100644
--- a/docs/authentication.txt
+++ b/docs/authentication.txt
@@ -66,8 +66,8 @@ Fields
long and can contain any character. See the "Passwords" section below.
* ``is_staff`` -- Boolean. Designates whether this user can access the
admin site.
- * ``is_active`` -- Boolean. Designates whether this user can log into the
- Django admin. Set this to ``False`` instead of deleting accounts.
+ * ``is_active`` -- Boolean. Designates whether this account can be used
+ to log in. Set this flag to ``False`` instead of deleting accounts.
* ``is_superuser`` -- Boolean. Designates that this user has all permissions
without explicitly assigning them.
* ``last_login`` -- A datetime of the user's last login. Is set to the
@@ -99,7 +99,9 @@ custom methods:
should prefer using ``is_authenticated()`` to this method.
* ``is_authenticated()`` -- Always returns ``True``. This is a way to
- tell if the user has been authenticated.
+ tell if the user has been authenticated. This does not imply any
+ permissions, and doesn't check if the user is active - it only indicates
+ that the user has provided a valid username and password.
* ``get_full_name()`` -- Returns the ``first_name`` plus the ``last_name``,
with a space in between.
@@ -120,13 +122,16 @@ custom methods:
* ``has_perm(perm)`` -- Returns ``True`` if the user has the specified
permission, where perm is in the format ``"package.codename"``.
+ If the user is inactive, this method will always return ``False``.
* ``has_perms(perm_list)`` -- Returns ``True`` if the user has each of the
specified permissions, where each perm is in the format
- ``"package.codename"``.
+ ``"package.codename"``. If the user is inactive, this method will
+ always return ``False``.
* ``has_module_perms(package_name)`` -- Returns ``True`` if the user has
any permissions in the given package (the Django app label).
+ If the user is inactive, this method will always return ``False``.
* ``get_and_delete_messages()`` -- Returns a list of ``Message`` objects in
the user's queue and deletes the messages from the queue.
@@ -283,7 +288,10 @@ password is invalid, ``authenticate()`` returns ``None``. Example::
from django.contrib.auth import authenticate
user = authenticate(username='john', password='secret')
if user is not None:
- print "You provided a correct username and password!"
+ if user.is_active:
+ print "You provided a correct username and password!"
+ else:
+ print "Your account has been disabled!"
else:
print "Your username and password were incorrect."
@@ -301,10 +309,13 @@ This example shows how you might use both ``authenticate()`` and ``login()``::
password = request.POST['password']
user = authenticate(username=username, password=password)
if user is not None:
- login(request, user)
- # Redirect to a success page.
+ if user.is_active:
+ login(request, user)
+ # Redirect to a success page.
+ else:
+ # Return a 'disabled account' error message
else:
- # Return an error message.
+ # Return an 'invalid login' error message.
How to log a user out
---------------------
diff --git a/docs/faq.txt b/docs/faq.txt
index e1f344c811..c7f92d3580 100644
--- a/docs/faq.txt
+++ b/docs/faq.txt
@@ -499,7 +499,7 @@ specify an object to edit or delete.
How do I add database-specific options to my CREATE TABLE statements, such as specifying MyISAM as the table type?
------------------------------------------------------------------------------------------------------------------
-We try to avoid adding special cases in the Django code to accomodate all the
+We try to avoid adding special cases in the Django code to accommodate all the
database-specific options such as table type, etc. If you'd like to use any of
these options, create an `SQL initial data file`_ that contains ``ALTER TABLE``
statements that do what you want to do. The initial data files are executed in
diff --git a/docs/forms.txt b/docs/forms.txt
index 2b00cb67d6..767225cfd4 100644
--- a/docs/forms.txt
+++ b/docs/forms.txt
@@ -489,7 +489,7 @@ required fields are present and non-empty. For each field that passes that
test *and if the form submission contained data* for that field, all the
validators for that field are called in turn. The emphasized portion in the
last sentence is important: if a form field is not submitted (because it
-contains no data -- which is normal HTML behaviour), the validators are not
+contains no data -- which is normal HTML behavior), the validators are not
run against the field.
This feature is particularly important for models using
diff --git a/docs/release_notes_0.95.txt b/docs/release_notes_0.95.txt
index e5b89e5a7a..3709cacf5a 100644
--- a/docs/release_notes_0.95.txt
+++ b/docs/release_notes_0.95.txt
@@ -110,7 +110,7 @@ many common questions appear with some regularity, and any particular problem
may already have been answered.
Finally, for those who prefer the more immediate feedback offered by IRC,
-there's a #django channel or irc.freenode.net that is regularly populated by
+there's a #django channel on irc.freenode.net that is regularly populated by
Django users and developers from around the world. Friendly people are usually
available at any hour of the day -- to help, or just to chat.
diff --git a/docs/settings.txt b/docs/settings.txt
index 57483cbef3..3f6e9b0e79 100644
--- a/docs/settings.txt
+++ b/docs/settings.txt
@@ -401,15 +401,6 @@ Subject-line prefix for e-mail messages sent with ``django.core.mail.mail_admins
or ``django.core.mail.mail_managers``. You'll probably want to include the
trailing space.
-ENABLE_PSYCO
-------------
-
-Default: ``False``
-
-Whether to enable Psyco, which optimizes Python code. Requires Psyco_.
-
-.. _Psyco: http://psyco.sourceforge.net/
-
IGNORABLE_404_ENDS
------------------
diff --git a/docs/templates.txt b/docs/templates.txt
index c9e76d6c94..b263a64aec 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -540,6 +540,11 @@ The arguments can be hard-coded strings, so the following is valid::
...
{% endifequal %}
+It is only possible to compare an argument to template variables or strings.
+You cannot check for equality with Python objects such as ``True`` or
+``False``. If you need to test if something is true or false, use the ``if``
+and ``ifnot`` tags instead.
+
ifnotequal
~~~~~~~~~~
@@ -1051,7 +1056,7 @@ Formats a date as the time since that date (i.e. "4 days, 6 hours").
Takes an optional argument that is a variable containing the date to use as
the comparison point (without the argument, the comparison point is *now*).
For example, if ``blog_date`` is a date instance representing midnight on 1
-June 2006, and ``comment_date`` is a date instanace for 08:00 on 1 June 2006,
+June 2006, and ``comment_date`` is a date instance for 08:00 on 1 June 2006,
then ``{{ comment_date|timesince:blog_date }}`` would return "8 hours".
timeuntil
diff --git a/docs/templates_python.txt b/docs/templates_python.txt
index 39e5b9d91a..8129b209c7 100644
--- a/docs/templates_python.txt
+++ b/docs/templates_python.txt
@@ -817,7 +817,7 @@ Inclusion tags
Another common type of template tag is the type that displays some data by
rendering *another* template. For example, Django's admin interface uses custom
-template tags to display the buttons along the botton of the "add/change" form
+template tags to display the buttons along the bottom of the "add/change" form
pages. Those buttons always look the same, but the link targets change depending
on the object being edited -- so they're a perfect case for using a small
template that is filled with details from the current object. (In the admin's
diff --git a/docs/testing.txt b/docs/testing.txt
index b1ede3e4cc..19eef9f071 100644
--- a/docs/testing.txt
+++ b/docs/testing.txt
@@ -389,7 +389,7 @@ an alternative framework as if they were normal Django tests.
When you run ``./manage.py test``, Django looks at the ``TEST_RUNNER``
setting to determine what to do. By default, ``TEST_RUNNER`` points to ``django.test.simple.run_tests``. This method defines the default Django
-testing behaviour. This behaviour involves:
+testing behavior. This behavior involves:
#. Performing global pre-test setup
#. Creating the test database
@@ -435,7 +435,7 @@ a number of utility methods in the ``django.test.utils`` module.
``create_test_db(verbosity=1, autoclobber=False)``
Creates a new test database, and run ``syncdb`` against it.
- ``verbosity`` has the same behaviour as in the test runner.
+ ``verbosity`` has the same behavior as in the test runner.
``Autoclobber`` describes the behavior that will occur if a database with
the same name as the test database is discovered. If ``autoclobber`` is False,
@@ -450,4 +450,4 @@ a number of utility methods in the ``django.test.utils`` module.
Destroys the database with the name ``settings.DATABASE_NAME`` matching,
and restores the value of ``settings.DATABASE_NAME`` to the provided name.
- ``verbosity`` has the same behaviour as in the test runner.
+ ``verbosity`` has the same behavior as in the test runner.
diff --git a/docs/tutorial03.txt b/docs/tutorial03.txt
index 248d234043..b4f1d303dc 100644
--- a/docs/tutorial03.txt
+++ b/docs/tutorial03.txt
@@ -91,7 +91,7 @@ Finally, it calls that ``detail()`` function like so::
The ``poll_id='23'`` part comes from ``(?P<poll_id>\d+)``. Using parenthesis around a
pattern "captures" the text matched by that pattern and sends it as an argument
to the view function; the ``?P<poll_id>`` defines the name that will be used to
-identify the matched pattern; and ``\d+`` is a regular experession to match a sequence of
+identify the matched pattern; and ``\d+`` is a regular expression to match a sequence of
digits (i.e., a number).
Because the URL patterns are regular expressions, there really is no limit on
diff --git a/docs/tutorial04.txt b/docs/tutorial04.txt
index f234ed0ce1..c5e2ea3cea 100644
--- a/docs/tutorial04.txt
+++ b/docs/tutorial04.txt
@@ -207,7 +207,7 @@ for the polls app, we manually specify a template name for the results view:
template. Note that we use ``dict()`` to return an altered dictionary in place.
In previous parts of the tutorial, the templates have been provided with a context
-that contains the ``poll` and ``latest_poll_list`` context variables. However,
+that contains the ``poll`` and ``latest_poll_list`` context variables. However,
the generic views provide the variables ``object`` and ``object_list`` as context.
Therefore, you need to change your templates to match the new context variables.
Go through your templates, and modify any reference to ``latest_poll_list`` to