Changes between Version 140 and Version 141 of BackwardsIncompatibleChanges
- Timestamp:
- Dec 11, 2007, 11:06:29 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BackwardsIncompatibleChanges
v140 v141 47 47 * [6832] Dec 2, 2007: [#Settingsexceptiontypeschanged Settings exception types changed] 48 48 * [6833] Dec 2, 2007: [#Genericviewsemptydefaults Generic views' empty defaults] 49 * [6838] Dec. 3, 2007: [#MultipleObjectsReturnedexceptioninsteadofAssertionError MultipleObjectsReturned exception instead of AssertionError] 49 50 50 51 == Database constraint names changed == … … 485 486 486 487 In [6833] the {{{allow_empty}}} parameter to the {{{archive_index()}}} and {{{object_list()}}} generic views were changed to be True by default. So viewing a list of objects that is empty will not raise a 404 HTTP error. Things like date-based views still raise a 404 when there is nothing to view (by default), since viewing a non-existent date is usually going to be an error. See #685 for details. 488 489 490 == `MultipleObjectsReturned` exception instead of `AssertionError` == 491 492 In [6838], `QuerySet.get()` was changed to raise a `MultipleObjectsReturned` exception rather than an assertion error when multiple objects are returned. 493 494 Before: 495 {{{ 496 #!python 497 try: 498 Model.objects.get(...) 499 except AssertionError: 500 ... 501 }}} 502 503 After: 504 {{{ 505 #!python 506 try: 507 Model.objects.get(...) 508 except Model.MultipleObjectsReturned: 509 ... 510 }}}