issues when upgrading from 1.3.7

hey,

so i’ve been caught up in the webfaction buyout and migration with a site i built some time ago (probably 9 / 10 years).

it was built on Django 1.3.7 and its not changed since.

I’m going to give the customer the option to take their business elsewhere, but should they want to retain it, how much pain am i going to go through to bring it up to speed in a current version of python and Django.

This isnt my area anymore, though i still code, so im looking forward to the challenge. any suggested approaches?

TIA

Matt

I think it’s really going to depend upon how intricate the site is or how fancy the site was with implementing features. It might be fairly trivial (a handful of well-defined changes) or it could be a nightmare - and I don’t think you’re going to be able to tell until you review the code.

I’ve never migrated anything that old - the oldest site I ever had to migrate was from 1.6 to 2(something). It was a trivial site, was done in less than a day. Obviously, your mileage may vary.

Ken

It depends very much on the third party apps in use.

Django 1.7 added migrations, so you may want to update to the 1.8 LTS first, remove South (if it was in use) and add Django migrations. Then, upgrade from LTS to LTS (I know the docs suggest upgrading to each released minor version in turn)

When projects didn’t use many third party libraries I even had great success moving e.g. from 1.0/1.1 directly to 1.11 or even 2.x. The way I did it was mostly by upgrading Django, running ./manage.py check or runserver and fixing problems as they appeared.

Problems which come to mind:

  • get_query_set => get_queryset
  • ForeignKey requiring on_delete (this one is annoying and cannot easily be automated using sed or something)
  • Some combinations of third party apps may make it easier to rewrite the site from the ground up :-/

thanks for the replys guys. first step i think is to get it running in 1.3.7, then i’ll maybe have remembered how all of this works!!!