1
0
mirror of https://github.com/django/django.git synced 2025-10-25 14:46:09 +00:00

Fixed #11404. Added `FormSet.has_changed, for consistancy with Form.has_changed`. Thanks to michelts for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor
2011-09-10 02:42:05 +00:00
parent 01b0eb50fd
commit d14bf8c62b
3 changed files with 48 additions and 1 deletions

View File

@@ -300,6 +300,12 @@ class BaseFormSet(StrAndUnicode):
"""
pass
def has_changed(self):
"""
Returns true if data in any form differs from initial.
"""
return any(form.has_changed() for form in self)
def add_fields(self, form, index):
"""A hook for adding extra fields on to each form instance."""
if self.can_order: