Andrew's Forge

Upgrading Django Checklist

Preliminary Requirements

  • Testing Suite
  • Testing Suite
  • Testing Suite
  • Development Environment
  • Staging/Testing Environment
  • List of Current Site Dependencies
  • Did I mention a Testing Suite? he asked while grinding his axe

Goals

  • Upgrade a Single Django Major Release
    • eg: 1.4 to 1.5 to 1.6 to 1.7, not 1.4 to 1.7
  • Divide and Conquer: Small Steps!
  • Always Valid: Each Change Leads to a Valid Deploy

Upgrading Django

  1. Plan
  2. Upgrade Dependencies
    • Each Dependency a Layer; Use Nested Lists
    • For Each Upgrade In Nested List:
      1. Upgrade the Dependency
      2. Test
        1. Run Test Suite
        2. Fix Any Problems
        3. Repeat Process until Correct
      3. Update Documentation
      4. Update Deploy Scripts
      5. Commit and Push Changes in Version Control System
  3. Upgrade Django
    • When Upgrading:
      1. Modify Code
      2. Test
        • python -Wall manage.py test
        • python -Werror manage.py test
      3. Repeat until Tests Pass
    • Upgrade Process:
      1. Preempt Backwards Incompatible Changes
      2. Upgrade Django Package
      3. Backwards Incompatible Changes
      4. Replace Deprecated Features
      5. Integrate New Features