Changes between Version 4 and Version 5 of Tutorial2


Ignore:
Timestamp:
07/14/09 21:43:09 (5 years ago)
Author:
andrew
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial2

    v4 v5  
    3131Now you understand the caveats, it's time to try it out. We'll take the same app we used for [wiki:Tutorial1 part one]. 
    3232 
    33 If you didn't have that set when you made the initial migration previously, don't worry; just delete that migration file, and re-run the command: 
     33Have another look at the migration file (`southdemo/migrations/0001_initial.py`) - there is a large models dictionary on the bottom; if you look closely, it is a representation of how your models are at the moment. It's using this stored representation that allows South to see how your models change over time. 
    3434 
    35 {{{ 
    36 ./manage.py startmigration southdemo --initial 
    37 }}} 
    38  
    39 The migration file (`southdemo/migrations/0001_initial.py`) should still have the same forwards() and backwards() methods, but now there will be a much larger models dictionary on the bottom; if you look closely, it is a representation of how your models are at the moment. 
    40  
    41 Once you have that file made, we'll change the models we have slightly; we'll add a field `length` to Lizard, and allow the age to be left blank (and become null if it is): 
     35To illustrate this, we'll make a change; we'll add a field `length` to Lizard, and allow the age to be left blank (and become null if it is): 
    4236 
    4337{{{