summaryrefslogtreecommitdiff
path: root/django/newforms/fields.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-01 05:55:01 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-01 05:55:01 +0000
commita61d4ebd5f4b49b296063eae603faa3c456d26e5 (patch)
tree3b88cfd1865e4a77400ec2becddaf93851f27f57 /django/newforms/fields.py
parentb89d409bf7ed7f9d6248c1ec188e241bdf5d4aa2 (diff)
unicode: Merged changes from trunk up to [5579].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms/fields.py')
-rw-r--r--django/newforms/fields.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/django/newforms/fields.py b/django/newforms/fields.py
index a91e5af450..b6abea6400 100644
--- a/django/newforms/fields.py
+++ b/django/newforms/fields.py
@@ -482,17 +482,18 @@ class ComboField(Field):
class MultiValueField(Field):
"""
- A Field that is composed of multiple Fields.
-
- Its clean() method takes a "decompressed" list of values. Each value in
+ A Field that aggregates the logic of multiple Fields.
+
+ Its clean() method takes a "decompressed" list of values, which are then
+ cleaned into a single value according to self.fields. Each value in
this list is cleaned by the corresponding field -- the first value is
cleaned by the first field, the second value is cleaned by the second
field, etc. Once all fields are cleaned, the list of clean values is
"compressed" into a single value.
- Subclasses should implement compress(), which specifies how a list of
- valid values should be converted to a single value. Subclasses should not
- have to implement clean().
+ Subclasses should not have to implement clean(). Instead, they must
+ implement compress(), which takes a list of valid values and returns a
+ "compressed" version of those values -- a single value.
You'll probably want to use this with MultiWidget.
"""