~ubuntuone-pqm-team/django/stable

« back to all changes in this revision

Viewing changes to django/forms/forms.py

  • Committer: Natalia
  • Date: 2015-12-29 23:45:16 UTC
  • Revision ID: natalia.bidart@ubuntu.com-20151229234516-i822kgwc995ia2vk
Imported Django 1.8.7 from released tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
447
447
    def changed_data(self):
448
448
        if self._changed_data is None:
449
449
            self._changed_data = []
450
 
            # XXX: For now we're asking the individual fields whether or not the
451
 
            # data has changed. It would probably be more efficient to hash the
452
 
            # initial data, store it in a hidden field, and compare a hash of the
453
 
            # submitted data, but we'd need a way to easily get the string value
454
 
            # for a given field. Right now, that logic is embedded in the render
455
 
            # method of each widget.
456
450
            for name, field in self.fields.items():
457
451
                prefixed_name = self.add_prefix(name)
458
452
                data_value = field.widget.value_from_datadict(self.data, self.files, prefixed_name)