Code

Changes between Version 93 and Version 94 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
05/14/07 09:27:27 (7 years ago)
Author:
mtredinnick
Comment:

Changed previous backwards-incompatibility to the version we settled on

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v93 v94  
    2424 * May 5, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#TestClientloginmethodchanged Test Client `login()` method changed] 
    2525 * May 8, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Genericrelationshavemoved Generic relations have moved] 
    26  * May 14, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Newforms:form-specificclean_methodsnamechange Newforms: form-specific clean_*() methods name change] 
     26 * May 14, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Newforms:clean_datachangedtocleaned_data Newforms: clean_data changed to cleaned_data] 
    2727 
    2828== Database constraint names changed == 
     
    171171No database changes or other model changes are required. 
    172172 
    173 == Newforms: form-specific clean_*() methods name change == 
     173== Newforms: clean_data changed to cleaned_data == 
    174174 
    175 If you have any form-specific cleaning methods in a newforms.Form subclass, they need to be renamed, as of [5231]. Change code that looks like this 
    176 {{{ 
    177 #!python 
    178 class SomeForm(Form) 
    179    some_field = ... 
    180    ... 
    181    def clean_some_field(self): 
    182       ... 
    183 }}} 
    184 to this 
    185 {{{ 
    186 #!python 
    187 class SomeForm(Form) 
    188    some_field = ... 
    189    ... 
    190    def do_clean_some_field(self): 
    191       ... 
    192 }}} 
    193 (the prefix of the function changes from {{{clean_}}} to {{{do_clean_}}}). The need for this change is demonstrated by the test in [5231]. Prior to that commit, the test would fail. 
     175If you are accessing form data that has been cleaned in newforms, you could previously use the {{{clean_data}} attribute on the form. In [5237], this was changed to {{{cleaned_data}}} to avoid a name-clash (see [5231] for why the change was necessary). 
     176 
     177You will need to do a search-and-replace in your form code and replace clean_data with cleaned_data everywhere.