Old Django apps to new environment

Hi all,
I’m new to Django, actually I started a week ago learning and using it. An old Virtual machine running Ubuntu 12.04, Python 2.7, Postgres 9.1 and Django 2.x crashed. The Django apps were created by a former colleague. I succeeded in restoring the virtual appliance and got Django up and running in development mode (I think) using the command python manage.py runserver.
But further reading and exploration of the old environment shows mod_wsgi was used to let Apache2 server serve the apps. I think it’s best to rebuild the complete system on a more recent and safe environment. Can I just copy the the Django directories to the new server? Is there a chance deprecated commands (from Django 2 > 3, Python 2.7 > Python 3.x) will break the code? Will the models still work with the recent Postgres 11?
Does anyone has experience with this issue?

Many, many thanks in advance!


Hi @zeff.

There’s no easy way to say that Yes it’ll be OK, but Django 2.x isn’t so old. No doubt they’ll be some breakages, but you just have to try it and see what breaks. (It’s probably less effort than trying to get an outdated system running again.)

Read the guide on Upgrading Django. It’s got some good advice.

Good luck!

Thanks carltongibson!

I think I have a still a long way to go and it will take time… :worried: