Search code examples
djangoupgradeproduction-environmentmigrate

How do I safely upgrade from Django 1.0.2 to 1.3.1?


Will the following work:

  1. Un-installing django 1.0.2
  2. Installing django 1.3.1
  3. Starting a 'new' project with the same name as the old one.
  4. Manually import all of my old apps etc.
  5. Cross my fingers I've not killed anything.

Presumably there are some significant differences between the versions so would that work? ..and is there a less painful (safe) way to do this?


Solution

  • It is very likely that things will break--there have been a lot of (good!) changes in Django since the old 1.0 days. Your first step really should probably be reading the release notes for each major version of Django along your upgrade path (particularly the "Backwards Incompatible Changes" sections) to get an idea of what changes have happened and what you'll need to change.

    You also need to plan to do the upgrade in development (not production!) first--you'll almost certainly need to update your project in quite a few places, so you'll want to do that offline and then move the updated code into production after you've finished testing.

    Release Notes:

    https://docs.djangoproject.com/en/dev/releases/1.1/

    https://docs.djangoproject.com/en/dev/releases/1.2/

    https://docs.djangoproject.com/en/dev/releases/1.3/