What’s new in Django 2.2
Django is a Python web framework for rapid development and this week it reached its 2.2 version. Most important highlight of this release is that 2.2 is a long-term support (LTS) version. Let’s take a closer look.
Have you heard of Django? I bet you have!
But for those who are not yet familiar with this framework, an introduction is in order.
As it’s branding suggests, “Django is a Python web framework for perfectionists with deadlines.” So if you are a perfectionist and have some pretty tough deadlines to meet, maybe Django can be a helpful tool for you.
Here are some of its main features.
- Fast: Designed to help developers realize ideas as quickly as possible.
- Fully loaded: Includes extras to help you complete common web development tasks.
- Secure: Provides developers with everything they need to avoid many common security mistakes, such as SQL injection, cross-site scripting, cross-site request forgery, and clickjacking.
- Scalable: Designed to handle heavy traffic demands.
- Versatile: Offers the tools to build any type of application you need.
And now that we made first contact, let’s take a look at what’s new in Django’s latest release!
What’s new in Django 2.2
Before we jump into the highlights of this release, it is important to talk about some support-related issues.
Django 2.2 is a long-term support (LTS) release. That means security and data loss fixes will be applied for this version for the coming three years, at least. Not only that but 2.2 will also receive fixes for crashing bugs, major functionality bugs in newly-introduced features, and regressions from older versions of Django until December 2019.
It is also crucial to note that after the release of Django 2.2, the 2.1 version has reached the end of mainstream support as the final minor bug fix release, namely 2.1.8, was released yesterday. Keep in mind, however, that Django 2.1 will keep receiving security and data loss fixes for the next eight months, that is until December 2019. As the Django team noted, “all users are encouraged to upgrade before then to continue receiving fixes for security issues.”
SEE ALSO: Top 5 IDEs and code editors for Python
But enough with the seriousness! Let’s have a quick look at some interesting highlights featured in Django 2.2.
- Long list models updates including support for PostgreSQL operator classes (
Index.opclasses), partial indexes (
Index.condition) and more.
- Staring with this version, admin actions are no longer collected from base
actionsnow follows standard Python inheritance.
UniqueConstraintclasses that can now enable adding custom database constraints.
- Now, it is possible to deserialize data using natural keys that contain forward references by passing
- After the database flush, the initial data migrations are now loaded in
TransactionTestCaseat the end of the test.
If you want to check out the full list of features, head over to the official release notes.