Welcome to Django 4

0

Django, the high-level Python web framework for building dynamic, full-stack websites, has received a major update. Django 4.0 adds support for unique functional constraints, has a new, more secure password hash, and uses more standard Python libraries.

We looked at several of these features when we introduced the Django 4 beta, but there are other features worth noting.

Improvements in Django 4 begin with the addition of a Rediscache backend that adds built-in support for using Redis as a backend for your Django applications. Another improvement is the easier customization of forms, form sets, and the error list, as they are now rendered using the template engine. Time zone handling has also been improved, and zoneinfo from the standard Python library is now the default time zone implementation in Django.

The Django framework makes website development easier by supporting user authentication, content administration, sitemaps, and RSS feeds, so security is a key issue. Security enhancements include a new password hash, scrypt, which is more secure and recommended compared to PBKDF2. Scrypt uses a set number of iterations to slow down brute force attacks like PBKDF2, but is designed to use more memory in order to limit the amount of parallelism an attacker can use. This reduces the possibility for attackers with sufficient resources to launch large-scale parallel attacks in order to speed up the attack process.

Unique constraints to ensure unique values ​​in a database column, and to prevent duplicate values ​​from appearing in the column, can now be better controlled from within Django. A new positional expression argument for UniqueConstraint () has been added. This allows you to create unique functional constraints on expressions and database functions.

In Postgresql, developers can create a functional unique index with ‘Lower’ and it will work as a unique case insensitive constraint. The new support allows this to be passed from Django.

Django 4.0 supports Python 3.8, 3.9, and 3.10. The Django 3.2.x series is the latest to support Python 3.6 and 3.7. Django 4 can be downloaded from the Django project download page.

django

More information

Django project website

Related Articles

Django 4 beta 1 released

Django 3 adds support for ASGI

Django 1.3 released

To be informed of new articles on I Programmer, subscribe to our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook Where Linkedin.

Banner

square

comments

or send your comment to: comments@i-programmer.info



Source link

Share.

About Author

Comments are closed.