Upgrading Django from 1.11 to 2.2

609 views
Skip to first unread message

אורי

unread,
Mar 29, 2019, 4:52:10 AM3/29/19
to django...@googlegroups.com
Hi,

I want to upgrade Django from 1.11 to 2.2. Do I have to upgrade first to 2.0 and then to 2.1, or can I upgrade directly from 1.11 to 2.2?

By the way, we use many third-party packages and I'm not sure which version of Django they support. Maybe not all of them already support Django 2.2.

Thanks!

Anirudh Jain

unread,
Mar 29, 2019, 6:53:19 AM3/29/19
to django...@googlegroups.com
First use 'pip freeze' in your virtual env to see all the packages installed. Then checkout their official, latest documentation to see whether they support django2.1 or not.

 Even if all them do, you might need to make a lot of changes in your code after upgrade. 

And no, you dont need to install django2 install django2.1. 

If you have checked libraries and are sure to upgrade then first uninstall prev version using 'pip uninstall django' and install the latest stable version by sinply using 'pip install django'

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABD5YeGDTteqPxsxq6rTQ4D8rLX%3D2nER61gBXMueSM088HWuoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ahmed Ishtiaque

unread,
Mar 29, 2019, 6:56:20 AM3/29/19
to django...@googlegroups.com
I'd suggest not worrying too much about upgrading to 2.2 right away. Since it's going to be an LTS release, the projects your project depends on will probably consider adding 2.2 support fairly fast. 

But if you want to give it a shot anyway, I'd suggest taking a look at what changed from 1.11 to 2.0, and trying a version bump and checking which of your tests fail. As far as I'm concerned, there shouldn't be too many differences between the django 2.x versions. 

There's also a guide provided by the official docs here: https://docs.djangoproject.com/en/2.1/howto/upgrade-version/

Hope this helps.

--

Balkesh Choudhary

unread,
Mar 29, 2019, 7:37:03 AM3/29/19
to django...@googlegroups.com
you can upgrade directly from 1.11 to 2.2, but some of third party packages may not support Django 2.2

--

Tim Graham

unread,
Mar 30, 2019, 9:36:48 AM3/30/19
to Django users
Consider the "Upgrading Django to a newer version" guide.

Derek

unread,
Apr 1, 2019, 4:16:37 AM4/1/19
to Django users
The upgrade doc has good, general advice but does not specifically address the issue of LTS-to-LTS upgrades; I must admit I am a bit disappointed as I thought that there would be explicit, official support for this migration (and its one of the reasons I have stayed on the older LTS up to now).

Tim Graham

unread,
Apr 1, 2019, 10:31:15 PM4/1/19
to Django users
The advice is to go from one the major version to the next. Don't try to skip versions.
Message has been deleted

dvij parekh

unread,
Apr 1, 2019, 11:32:14 PM4/1/19
to Django users
always go for 2nd last or 3rd last release of any framework or any language it will be more stable but if you want to go with 2.2 you can because it comes with LTS

Derek

unread,
Apr 2, 2019, 9:44:34 AM4/2/19
to Django users
I agree; and the reason for Django moving to LTS releases was so that you would be able to upgrade from one LTS to the next.  Hence the OP (and others like me I am sure) asking how that can be done - we are looking for specific advice or instructions (and less about "general" guidelines).

אורי

unread,
Apr 2, 2019, 11:58:56 AM4/2/19
to django...@googlegroups.com
I accept Tim's advice to upgrade from one major version to the next. Even if I want to upgrade from 1.11 to 2.2, I have to upgrade first to 2.0 and then 2.1 and only then 2.2. It makes sense.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

אורי

unread,
Apr 2, 2019, 12:04:17 PM4/2/19
to django...@googlegroups.com
From the page Tim linked:

"If you’re upgrading through more than one feature version (e.g. A.B to A.B+2), it’s usually easier to upgrade through each feature release incrementally (A.B to A.B+1 to A.B+2) rather than to make all the changes for each feature release at once. For each feature release, use the latest patch release (A.B.C).

The same incremental upgrade approach is recommended when upgrading from one LTS to the next."

So it's written there. It's recommended to upgrade through each feature release incrementally and not directly from LTS to the next LTS.

On Tue, Apr 2, 2019 at 5:31 AM Tim Graham <timog...@gmail.com> wrote:
The advice is to go from one the major version to the next. Don't try to skip versions.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages