Changes between Version 2 and Version 5 of Ticket #11595


Ignore:
Timestamp:
Apr 8, 2011, 6:11:09 PM (14 years ago)
Author:
Łukasz Rekucki
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11595

    • Property Owner changed from nobody to Raúl Cumplido
    • Property Status newassigned
  • Ticket #11595 – Description

    v2 v5  
    1 For example, here's what django/db/models/fields/__init__.py has for lines 341-348:
     1For example, here's what {{{django/db/models/fields/__init__.py}}} has for lines 341-348:
    22
    3     def to_python(self, value):
    4         if value is None:
    5             return value
    6         try:
    7              return int(value)
    8         except (TypeError, ValueError):
    9             raise exceptions.ValidationError(
    10                 _("This value must be an integer.") )
     3{{{#!python
     4def to_python(self, value):
     5    if value is None:
     6        return value
     7    try:
     8        return int(value)
     9    except (TypeError, ValueError):
     10        raise exceptions.ValidationError(_("This value must be an integer."))
     11}}}
    1112
    1213Changing line 348 to:
    1314
    14                  _("(%s) must be an integer." % value) )
     15{{{#!python   
     16_("(%s) must be an integer." % value))
     17}}}
    1518
    1619means that when you convert a text field to a joined object, you know which one's broken where. (Other places in that file do the same thing)
Back to Top