what are the new features available in the django 3.2

Spread the love

We know that Django release it latest new version 3.2 so next question is what is exactly new feature :

what are the new features available in the django 3.2
what are the new features available in the django 3.2

Following are the some new Feature are Available in Django 3.2:

New Features in the Django Framework 3.2

1.New admin Decorators
2.Value Detects type
3.Loud signal Receiver
4.Covering Indexes
5.Trun date for time-zone
6.JSON object Building
7.Wishlist

Some important Features of Django 3.2

(a) It has feature of covering indexes which allow us to store a additional column in an index. When a query only uses field that are present in the index, the database can use an index-only scan meaning the actual table is not accessed at all, this is one of the advantage. This makes queries faster.

(b) It will provide Timezone to TruncDate. Earlier the timezone was set internally according to the current timezone.

(c) It will facilitate building JSON Objects. In Django 3.2, that function that accepts arbitrary key-value pair was added to the ORM.

(d) Loud Signal Receiver.

(e) The new QuerySet.alias() method allows creating reusable aliases for expressions that don’t need to be selected but are used for filtering as a part of complex expressions.

(f) Value () expression now automatically resolves its output_field to the appropriate Field subclass based on the types of it’s provided value for bool, bytes, float, int, str, date etc.

(g) There are navigable link in the admin.

(h) Cached templates are reloaded on Django’s development server.

(i) There is a feature of new admin decorators. In earlier versions, to customize a calculated field in the Django admin you first added a function and then assigned some attributes to it.

Explanation of Each Feature in one by one:

1.New admin Decorators:
Django’s admin accepts callable for list_display and read only_fields. In order to customize these callable (e.g. annotate them with a description) django requires developer to set an attribute on a callable (e.g. ‘short_description’). This is a simple approach and it works.
But it is easy to make a typo or to forget what attribute should be set on a callable because there is no auto completion.

  1. Value detects type : Value now automatically resolves its output_field to the appropriate Field subclass based on the type of its provided value for bool, bytes, float, int, str, datetime.date, datetime.datetime, datetime.time, datetime.timedelta, decimal.Decimal, and uuid.UUID instances. As a consequence, resolving an output_field for database functions and combined expressions may now crash with mixed types when using Value(). You will need to explicitly set the output_field in such cases.
  2. Loud signal receiver: To never miss excepections in signal , they introduce loud signal which is no longer necessary.
  3. Covering index: The main benefit of a covering index is that when a query only uses fields that are present in the index, the database can use an index-only scan, meaning the actual table is not accessed at all. This can make queries faster.
  1. Trunc date for time-zone : It allows truncating Date in Any specific time-zone.
  2. JSON object building : Like POSTgreSQL now have handy JSON object builing capacity.
  3. Wishlist: There are still few things Django needs to improve:
  4. a. Type hinting
  5. b. Connection pooling , view and partition in DB
  6. c.Returning update status etc

sachin Pagar

I am Mr. Sachin pagar Embedded software engineer, the founder of Sach Educational Support(Pythonslearning), a Passionate Educational Blogger and Author, who love to share the informative content on educational resources.

Leave a Reply