1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

newforms-admin: Cleaned up the implementation and APIs of all the formset classes. Backwards-incompatible.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7270 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans
2008-03-17 17:55:16 +00:00
parent 40d55238b8
commit 93c45b5704
11 changed files with 623 additions and 504 deletions

View File

@@ -292,12 +292,6 @@ checkboxes).
>>> w.value_from_datadict({}, {}, 'testing')
False
The CheckboxInput widget will always be empty when there is a False value
>>> w.is_empty(False)
True
>>> w.is_empty(True)
False
# Select Widget ###############################################################
>>> w = Select()
@@ -459,15 +453,6 @@ over multiple times without getting consumed:
<option value="3" selected="selected">No</option>
</select>
The NullBooleanSelect widget will always be empty when Unknown or No is selected
as its value. This is to stay compliant with the CheckboxInput behavior
>>> w.is_empty(False)
True
>>> w.is_empty(None)
True
>>> w.is_empty(True)
False
""" + \
r""" # [This concatenation is to keep the string below the jython's 32K limit].
# SelectMultiple Widget #######################################################
@@ -910,16 +895,6 @@ u'<input id="foo_0" type="text" class="big" value="john" name="name_0" /><br /><
>>> w.render('name', ['john', 'lennon'])
u'<input id="bar_0" type="text" class="big" value="john" name="name_0" /><br /><input id="bar_1" type="text" class="small" value="lennon" name="name_1" />'
The MultiWidget will be empty only when all widgets are considered empty.
>>> w.is_empty(['john', 'lennon'])
False
>>> w.is_empty(['john', ''])
False
>>> w.is_empty(['', ''])
True
>>> w.is_empty([None, None])
True
# SplitDateTimeWidget #########################################################
>>> w = SplitDateTimeWidget()