MCPcopy
hub / github.com/django/django / compress

Method compress

django/forms/fields.py:1157–1166  ·  view source on GitHub ↗

Return a single value for the given list of values. The values can be assumed to be valid. For example, if this MultiValueField was instantiated with fields=(DateField(), TimeField()), this might return a datetime object created by combining the date and tim

(self, data_list)

Source from the content-addressed store, hash-verified

1155 return out
1156
1157 def compress(self, data_list):
1158 """
1159 Return a single value for the given list of values. The values can be
1160 assumed to be valid.
1161
1162 For example, if this MultiValueField was instantiated with
1163 fields=(DateField(), TimeField()), this might return a datetime
1164 object created by combining the date and time in data_list.
1165 """
1166 raise NotImplementedError("Subclasses must implement this method.")
1167
1168 def has_changed(self, initial, data):
1169 if self.disabled:

Callers 1

cleanMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected