Chapter 8. Dealing with Legacy Code

In this chapter, we will discuss the following topics:

  • Reading a Django code base
  • Discovering relevant documentation
  • Incremental changes versus full rewrites
  • Writing tests before changing code
  • Legacy database integration

It sounds exciting when you are asked to join a project. Powerful new tools and cutting-edge technologies might await you. However, quite often, you are asked to work with an existing, possibly ancient, codebase.

To be fair, Django has not been around for that long. However, projects written for older versions of Django are sufficiently different to cause concern. Sometimes, having the entire source code and documentation might not be enough.

If you are asked to recreate the environment, then you might ...

Get Django Design Patterns and Best Practices now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.