Changes between Version 145 and Version 146 of BackwardsIncompatibleChanges
- Timestamp:
- Dec 16, 2007, 4:16:23 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BackwardsIncompatibleChanges
v145 v146 16 16 17 17 Changes made after Django [source:/django/tags/releases/0.96 0.96]: 18 * [6915] December 12, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedModelFormsinitsignaturetomatchForms Changed ModelForm's init signature to match Form's]19 18 * [4885] March 31, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Changedspacelesstemplatetagtoremoveallspaces Changed 'spaceless' template tag to remove all spaces] 20 19 * [4954] April 8, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Renamedlocalflavor.usatolocalflavor.us Renamed `localflavour.usa` to `localflavor.us`] … … 86 85 In [4767], we added a {{{mysql_old}}} backend, which is identical to the {{{mysql}}} backend prior to the change in [4724]. You can use this backend if upgrading the {{{MySQLdb}}} module is not immediately possible. However, the {{{mysql_old}}} backend is deprecated, and we will not continue developing it. 87 86 88 == Changed ModelForm's init signature to match Form's ==89 90 As of [6915] the {{{__init__}}} signature for {{{ModelForm}}} matches that of {{{newforms.Form}}}. {{{ModelForm}}} objects can now be instantiated by supplying the relevant form data without requiring a model instance to be passed in.91 92 Before the change {{{ModelForm}}} objects used in views were instantiated as follows:93 {{{94 form = MyModelForm(instance, request.POST.copy())95 }}}96 97 This now becomes98 {{{99 form = MyModelForm(request.POST.copy(), instance = instance)100 }}}101 102 The instance argument is optional. If missing, a new instance of the model associated with the {{{ModelForm}}} is created.103 104 87 == Changed 'spaceless' template tag to remove all spaces == 105 88