Django 3.0 release version is out now !!! We will be discussing today whats added and removed so in general what's new in Django 3.0.
Source: OFFICIAL LINK
Welcome to Django 3.0!
we'll start by discussing the compatibility of it with python versions
According to official documentation Django 3.0 supports Python 3.6, 3.7, and 3.8. We highly recommend and only officially support the latest release of each series.
The Django 2.2.x series is the last to support Python 3.5.
Finally coming to the main topic
Django now officially supports MariaDB 10.1 and higher. See MariaDB notes for more details.
Django 3.0 begins our journey to making Django fully async-capable by providing support for running as an ASGI application.
This is in addition to our existing WSGI support. Django intends to support both for the foreseeable future. Async features will only be available to applications that run under ASGI, however.
There is no need to switch your applications over unless you want to start experimenting with asynchronous code, but we have documentation on deploying with ASGI if you want to learn more.
Note that as a side-effect of this change, Django is now aware of asynchronous event loops and will block you calling code marked as “async unsafe” - such as ORM operations - from an asynchronous context. If you were using Django from async code before, this may trigger if you were doing it incorrectly. If you see a SynchronousOnlyOperation
error, then closely examine your code and move any database operations to be in a synchronous child thread.
The new ExclusionConstraint class enable adding exclusion constraints on PostgreSQL. Constraints are added to models using the Meta.constraints option.
Expressions that output BooleanField may now be used directly in QuerySet
filters, without having to first annotate and then filter against the annotation.
Custom enumeration types TextChoices
, IntegerChoices
, and Choices
are now available as a way to define Field.choices. TextChoices
and IntegerChoices
types are provided for text and integer fields. The Choices
class allows defining a compatible enumeration for other concrete data types. These custom enumeration types support human-readable labels that can be translated and accessed via a property on the enumeration or its members. See Enumeration types for more details and examples.
Some minor features have also been added to it which are explained in the docs here
Upstream support for Oracle 12.1 ends in July 2021. Django 2.2 will be supported until April 2022. Django 3.0 officially supports Oracle 12.2 and 18c.
Upstream support for PostgreSQL 9.4 ends in December 2019. Django 3.0 supports PostgreSQL 9.5 and higher.
While Python 2 support was removed in Django 2.0, some private APIs weren’t removed from Django so that third party apps could continue using them until the Python 2 end-of-life.
In older versions, the FILE_UPLOAD_PERMISSIONS setting defaults to None
. With the default FILE_UPLOAD_HANDLERS, this results in uploaded files having different permissions depending on their size and which upload handler is used.
FILE_UPLOAD_PERMISSION
now defaults to 0o644
to avoid this inconsistency.
To make Django projects more secure by default, some security settings now have more secure default values:
A more detailed version of this update can be found in the official link give at the very top.