Changes between Version 82 and Version 83 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
04/06/07 23:30:27 (8 years ago)
Author:
adrian
Comment:

Removed the newforms-admin changes, so as not to confuse people

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v82 v83  
    1313 * August 11, 2006: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Backslashescapingchanged Backslash escaping changed]
    1414 * September 27, 2006: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#RemovedENABLE_PSYCOsetting Removed ENABLE_PSYCO setting]
    15  * January 16, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedAdmin.manageroptiontomoreflexiblehook Changed Admin.manager option to more flexible hook]
    16  * January 28, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Changedprepopulate_fromtobedefinedintheAdminclassnotdatabasefieldclasses Changed prepopulate_from to be defined in the Admin class, not database field classes]
    17  * February 25, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Movedadmindocviewsintodjango.contrib.admindocs Moved admin doc views into django.contrib.admindocs]
    1815 * March 14, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#EnforcingMySQLdbversion Enforcing MySQLdb version]
    1916
     
    5249As of [3877], the {{{ENABLE_PSYCO}}} setting no longer exists. If your settings file includes {{{ENABLE_PSYCO}}}, nothing will break per se, but it just won't do anything. If you want to use [http://psyco.sourceforge.net/ Psyco] with Django, write some custom middleware that activates Psyco.
    5350
    54 == Changed Admin.manager option to more flexible hook ==
    55 
    56 As of [4342], the {{{manager}}} option to {{{class Admin}}} no longer exists. This option was undocumented, but we're mentioning the change here in case you used it. In favor of this option, {{{class Admin}}} may now define one of these methods:
    57 
    58   * {{{queryset()}}}
    59   * {{{queryset_add()}}}
    60   * {{{queryset_change()}}}
    61 
    62 These give you much more flexibility.
    63 
    64 Note that this change was made to the NewformsAdminBranch. (We initially called the new method {{{change_list_queryset}}}, but this was changed in [4584] to be more flexible.) The change will not be made to trunk until that branch is merged to trunk.
    65 
    66 == Changed prepopulate_from to be defined in the Admin class, not database field classes ==
    67 
    68 As of [4446], the {{{prepopulate_from}}} option to database fields no longer exists. It's been discontinued in favor of the new {{{prepopulated_fields}}} option on {{{class Admin}}}. The new {{{prepopulated_fields}}} option, if given, should be a dictionary mapping field names to lists/tuples of field names. Here's an example comparing old syntax and new syntax:
    69 
    70 {{{
    71 #!python
    72 
    73 # OLD:
    74 class MyModel(models.Model):
    75     first_name = models.CharField(maxlength=30)
    76     last_name = models.CharField(maxlength=30)
    77     slug = models.CharField(maxlength=60, prepopulate_from=('first_name', 'last_name'))
    78 
    79     class Admin:
    80         pass
    81 
    82 # NEW:
    83 class MyModel(models.Model):
    84     first_name = models.CharField(maxlength=30)
    85     last_name = models.CharField(maxlength=30)
    86     slug = models.CharField(maxlength=60)
    87 
    88     class Admin:
    89         prepopulated_fields = {'slug': ('first_name', 'last_name')}
    90 }}}
    91 
    92 Note that this change was made to the NewformsAdminBranch. The change will not be made to trunk until that branch is merged to trunk.
    93 
    94 == Moved admin doc views into django.contrib.admindocs ==
    95 
    96 As of [4585], the documentation views for the Django admin site were moved into a new package, {{{django.contrib.admindocs}}}.
    97 
    98 The admin docs, which aren't documented very well, were located at {{{docs/}}} in the admin site. They're also linked-to by the "Documentation" link in the upper right of default admin templates.
    99 
    100 Because we've moved the doc views, you now have to activate admin docs explicitly. Do this by adding the following line to your URLconf:
    101 
    102 {{{
    103 #!python
    104 (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    105 }}}
    106 
    107 Note that this change was made to the NewformsAdminBranch. The change will not be made to trunk until that branch is merged to trunk.
    108 
    10951== Enforcing MySQLdb version ==
    11052
Back to Top