Changes between Initial Version and Version 1 of Ticket #11595, comment 4
- Timestamp:
- Apr 8, 2011, 6:13:04 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11595, comment 4
initial v1 1 1 It seems the code is changed since the bug was reported. Now the code has dictionaries with default_error_messages. Example for lines 865-857: 2 {{{#!python 2 3 default_error_messages = { 3 4 'invalid': _("This value must be an integer."), 4 5 } 6 }}} 5 7 And in the Exception it has the next, lines 884-890: 6 8 {{{#!python 7 9 def to_python(self, value): 8 10 if value is None: … … 12 14 except (TypeError, ValueError): 13 15 raise exceptions.ValidationError(self.error_messages['invalid']) 14 16 }}} 15 17 Should we change the code to: 16 18 {{{#!python 17 19 default_error_messages = { 18 20 'invalid': _("(%s) must be an integer."), … … 26 28 except (TypeError, ValueError): 27 29 msg = self.error_messages['invalid'] % _(str(value)) 28 29 30 raise exceptions.ValidationError(msg) 30 31 }}} 31 32 I am new and that's why I taked an easy_pickings one. But I want to have your ok to prepare my first patch. 32 33