Changes between Version 114 and Version 115 of BackwardsIncompatibleChanges
- Timestamp:
- Aug 6, 2007, 9:21:43 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BackwardsIncompatibleChanges
v114 v115 32 32 * [5752] July 23, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Addedinteractiveargumenttorun_tests Added `interactive` argument to `run_tests`] 33 33 * [5769] July 28, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Changedformatforfirstargumenttorun_tests Changed format for first argument to `run_tests` ] 34 * [5819] August 6, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Minorchangetonewformsargumentsanddatadictionaryhandling Minor change to newforms arguments and data dictionary handling ] 34 35 35 36 == Database constraint names changed == … … 267 268 This change has no effect on most end users. However, it does require a significant change to the prototype of run_test, which will be backwards incompatible for anyone with a customized test runner. Previously, the first argument to `run_tests` was a list of application modules. These modules would then be searched for test cases. After [5769], the first argument to `run_tests` is a list of test labels. Whereas run_tests was previously given a list of already-loaded applications, it is now the responsibility of the test runner to load the appropriate applications. Anyone with a customized test runner will need to incorporate the appropriate calls to `get_app()` as part of their test runner. 268 269 270 == Minor change to newforms arguments and data dictionary handling == 271 272 In [5819], `FileField` and `ImageField` were added to newforms. Implementing these fields required some subtle changes to the way data binding occurs in newforms. 273 274 This change will have no effect on most end users. The simple cases for binding forms do not change. However: 275 276 * The second argument to a form instance is now taken by file data. As a result, if you implicitly relied upon the order of the keyword arguments `auto_id`, `prefix` and `initial` when instantiating forms, your forms will no longer interpret these options correctly. To overcome this problem, explicitly name these keyword arguments - for example, use: 277 278 {{{ 279 f = ContactForm(data, auto_id=True) 280 }}} 281 282 rather than: 283 284 {{{ 285 f = ContactForm(data, True) 286 }}} 287 288 * A `files` argument was added to the prototype for `value_from_datadict()` to allow for the processing of file data. If you have written any custom widgets that provide their own data dictionary handling, you will need to modify those widgets to accomodate the new argument. If your custom widget has no need to handle file data, all you will need to do is change the method definition from: 289 290 {{{ 291 def value_from_datadict(self, data, name): 292 }}} 293 294 to: 295 296 {{{ 297 def value_from_datadict(self, data, files, name): 298 }}} 299