Changes between Version 159 and Version 160 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
Apr 13, 2008, 12:11:02 PM (16 years ago)
Author:
Wayne K. Werner
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v159 v160  
    573573== Changed Field.get_internal_type() default ==
    574574
    575 If you were subclassing an existing model field and were relying on the fact that the {{{Field.get_internal_type()}}} method would return your class name by default, you will need to alter your code to explicitly say that (i.e. to return the string you want). It seemed that most subclassing of existing fields (even in Django core) were using the parent's column type, so we've now set things up to exploit that. Thus, inheriting from a {{{CharField}}} results in {{{get_internal_type()}}} returning ''CharField'', etc.
     575If you were subclassing an existing model field and were relying on the fact that the {{{Field.get_internal_type()}}} method would return your class name by default, you will need to alter your code to explicitly say that (i.e. to return the string you want). It seemed that most subclassing of existing fields (even in Django core) were using the parent's column type, so we've now set things up to exploit that. Thus, inheriting from a {{{CharField}}} results in {{{get_internal_type()}}} returning ''!CharField'', etc.
    576576
    577577== Changed decorators to inherit attributes of the function they wrap ==
Back to Top