summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-02-25 20:01:08 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-02-25 20:01:08 +0000
commit8a70334640b31229d53e982bd59d951fe15aecbc (patch)
tree793c50ad4f6fea8de6507672aa123adade5f3abf /docs
parent43829a95d3e5740250794a0b4400fd813e724a2e (diff)
newforms-admin: Merged to [4579]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/authentication.txt4
-rw-r--r--docs/email.txt6
-rw-r--r--docs/forms.txt4
3 files changed, 9 insertions, 5 deletions
diff --git a/docs/authentication.txt b/docs/authentication.txt
index ef30879ae0..a7c28fc7a8 100644
--- a/docs/authentication.txt
+++ b/docs/authentication.txt
@@ -813,13 +813,13 @@ The ``authenticate`` method takes credentials as keyword arguments. Most of
the time, it'll just look like this::
class MyBackend:
- def authenticate(username=None, password=None):
+ def authenticate(self, username=None, password=None):
# Check the username/password and return a User.
But it could also authenticate a token, like so::
class MyBackend:
- def authenticate(token=None):
+ def authenticate(self, token=None):
# Check the token and return a User.
Either way, ``authenticate`` should check the credentials it gets, and it
diff --git a/docs/email.txt b/docs/email.txt
index 1edce88cef..1f4ce4ef42 100644
--- a/docs/email.txt
+++ b/docs/email.txt
@@ -34,8 +34,8 @@ The simplest way to send e-mail is using the function
``django.core.mail.send_mail()``. Here's its definition::
send_mail(subject, message, from_email, recipient_list,
- fail_silently=False, auth_user=EMAIL_HOST_USER,
- auth_password=EMAIL_HOST_PASSWORD)
+ fail_silently=False, auth_user=None,
+ auth_password=None)
The ``subject``, ``message``, ``from_email`` and ``recipient_list`` parameters
are required.
@@ -65,7 +65,7 @@ send_mass_mail()
Here's the definition::
send_mass_mail(datatuple, fail_silently=False,
- auth_user=EMAIL_HOST_USER, auth_password=EMAIL_HOST_PASSWORD):
+ auth_user=None, auth_password=None):
``datatuple`` is a tuple in which each element is in this format::
diff --git a/docs/forms.txt b/docs/forms.txt
index fc10e3f17a..8c40eeb997 100644
--- a/docs/forms.txt
+++ b/docs/forms.txt
@@ -608,6 +608,10 @@ fails. If no message is passed in, a default message is used.
order). If the given field does (or does not have, in the latter case) the
given value, then the current field being validated is required.
+ An optional ``other_label`` argument can be passed which, if given, is used
+ in error messages instead of the value. This allows more user friendly error
+ messages if the value itself is not descriptive enough.
+
Note that because validators are called before any ``do_html2python()``
functions, the value being compared against is a string. So
``RequiredIfOtherFieldEquals('choice', '1')`` is correct, whilst