Changes between Initial Version and Version 1 of Ticket #23547
- Timestamp:
- Sep 23, 2014, 9:17:03 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23547
- Property Resolution → duplicate
- Property Status new → closed
-
Ticket #23547 – Description
initial v1 1 {{{ 1 2 class BooleanField(Field): 2 3 def to_python(self, value): … … 10 11 if not value and self.required: 11 12 raise ValidationError(self.error_messages['required'], code='required') 13 }}} 12 14 In method "validate" value is "True" or "False" as python object, because called after to_python. 13 15 So if value is valid ('0' or 'false') and field is required, will be raised ValidationError.