Code

Changes between Version 90 and Version 91 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
05/14/07 07:08:26 (7 years ago)
Author:
mtredinnick
Comment:

clean_* --> do_clean_* change

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v90 v91  
    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#Newformsform-specificclean_methodsnamechange Newforms: form-specific clean_*() methods name change] 
    2627 
    2728== Database constraint names changed == 
     
    165166 
    166167No database changes or other model changes are required. 
     168 
     169== Newforms: form-specific clean_*() methods name change == 
     170 
     171If 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 
     172{{{ 
     173#!/python 
     174class SomeForm(Form) 
     175   some_field = ... 
     176   ... 
     177   def clean_some_field(self): 
     178      ... 
     179}}} 
     180to this 
     181{{{ 
     182#!/python 
     183class SomeForm(Form) 
     184   some_field = ... 
     185   ... 
     186   def do_clean_some_field(self): 
     187      ... 
     188}}} 
     189(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.