Changes between Version 115 and Version 116 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
Aug 16, 2007, 6:57:40 PM (17 years ago)
Author:
Russell Keith-Magee
Comment:

Details on changes to management

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v115 v116  
    3333 * [5769] July 28, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Changedformatforfirstargumenttorun_tests Changed format for first argument to `run_tests` ]
    3434 * [5819] August 6, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Minorchangetonewformsargumentsanddatadictionaryhandling Minor change to newforms arguments and data dictionary handling ]
     35 * [5898] August 16, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Changestomanagement.pycommands Changes to management.py commands ]
     36
    3537
    3638== Database constraint names changed ==
     
    298300}}}
    299301
     302== Changes to management.py commands ==
     303
     304In [5898], we refactored `management.py`. This was partially to clean up a 1700 line file, but also to allow user applications to register commands for use in `management.py`.
     305
     306As a result, any calls to management services in your code will need to be adjusted. For example, if you have some test code that calls `flush` and `load_data`:
     307{{{
     308>>> from django.core import management
     309>>> management.flush(verbosity=0, interactive=False)
     310>>> management.load_data(['test_data'], verbosity=0)
     311}}}
     312
     313You will need to change this code to read:
     314{{{
     315>>> from django.core import management
     316>>> management.call_command('flush', verbosity=0, interactive=False)
     317>>> management.call_command('load_data', ['test_data'], verbosity=0)
     318}}}
Back to Top