Changes between Version 89 and Version 90 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
May 8, 2007, 6:10:09 AM (18 years ago)
Author:
Malcolm Tredinnick
Comment:

Described generic relation change

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v89 v90  
    2323 * April 25, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#LOGIN_URLisnowasetting Login URL is now a setting]
    2424 * May 5, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#TestClientloginmethodchanged Test Client `login()` method changed]
     25 * May 8, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Genericrelationshavemoved Generic relations have moved]
    2526
    2627== Database constraint names changed ==
     
    144145c.login(username='myuser', password='mypassword')
    145146}}}
    146 The keyword arguments `username` and `password` *must* be given explicitly. If an alternate authentication scheme is in use, the credentials required by that scheme can be provided instead of `username` and `password`.
     147The keyword arguments `username` and `password` *must* be given explicitly. If an alternate authentication scheme is in use, the credentials required by that scheme can be provided instead of `username` and `password`.
     148
     149== Generic relations have moved ==
     150
     151In [5172], the various generic relation classes (!GenericForeignKey and !GenericRelation) have moved into the django.contrib.contenttypes module. This is because they will not work if contenttypes is not an installed app. Making the import path reflect the dependency should help remind people of this.
     152
     153Code using generic relations should change from saying things like
     154{{{
     155#!python
     156generic_field = models.GenericRelation(SomeOtherModel)
     157}}}
     158to using
     159{{{
     160#!python
     161from django.contrib.contenttypes import generic
     162...
     163generic_field = generic.GenericRelation(SomeOtherModel)
     164}}}
     165
     166No database changes or other model changes are required.
Back to Top