release of the web framework , written in Python and designed for web application development. The Django 3.0 branch is classified as a release with a standard support period and will updates until April 2021. The LTS branch 2.22 will be supported until April 2022, while the 1.11 branch will be supported until April 2020. Support for the 2.1 branch has ended.
Key :
- support for asynchronous operation with execution in the form of an ASGI application. The interface (Asynchronous Server Gateway Interface) is developed as a replacement for WSGI, aimed at ensuring interaction between servers, frameworks, and applications that support asynchronous operation. Support for launching using WSGI is retained, and the related asynchronous code is included only when running in ASGI-based environments.
For asynchronous mode, a separate event loop is implemented, in which calls to code marked as ‘async unsafe’ are not allowed. Such code includes, for example, operations with database management systems (ORM), which cannot be used in an asynchronous context (in this case, an SynchronousOnlyOperation error will be raised) and should be moved to a separate synchronous thread.
- Specialized enumerated types TextChoices, IntegerChoices, and Choices have been added, which can be used to define text and integer fields in a model, for instance, when there is a need to store sets of readable labels that translate to specific values:
class YearInSchool(models.TextChoices):
FRESHMAN = 'FR', _('Freshman')
SOPHOMORE = 'SO', _('Sophomore')
JUNIOR = 'JR', _('Junior')
SENIOR = 'SR', _('Senior')
GRADUATE = 'GR', _('Graduate') - The ability to specify expressions that output , directly in QuerySet filters without prior annotation before applying for annotation filtering has been provided.
- Official support for MariaDB 10.1 and newer releases has been ensured.
- For PostgreSQL, the class has been implemented for using constraints based on expressions ;
- Support for Python 3.5 has been discontinued.
Source: opennet.ru
