Ticket #11404: formset-has-changed.diff

File formset-has-changed.diff, 620 bytes (added by Dennis Kaarsemaker, 15 years ago)
  • django/forms/formsets.py

     
    263263        """
    264264        pass
    265265
     266    def has_changed(self):
     267        """
     268        Returns true if data in any form differs from initial.
     269        """
     270        for form in self.forms:
     271            if form.has_changed():
     272                return True
     273        return False
     274
    266275    def add_fields(self, form, index):
    267276        """A hook for adding extra fields on to each form instance."""
    268277        if self.can_order:
Back to Top