Version 1.10 of Django has been released, bringing full text search for PostgreSQL, official support for Unicode usernames and new-style middleware.
The major release for Django Software Foundation's dynamic language includes using database functions in the
module to ease the use of PostgreSQL’s full text search engine.
The team provides the following example of using a simple search against a single column in the database
>>> Entry.objects.filter(body_text__search='Cheese') [<Entry: Cheese on Toast recipes>, <Entry: Pizza Recipes>]
in the database from the
from the search term 'Cheese', both using the default database search configuration. The results are obtained by matching the query and the vector. To use the search lookup, 'django.contrib.postgres' must be in your INSTALLED_APPS."
Also new in Django 1.10 is the introduction of a new style of middleware that is intended as a solution for "the lack of strict request/response layering of the old-style of middleware described in DEP 0005 ."
A "framework of hooks into Django's request/response processing" Django's new middleware provides
for creating middleware classes compatible with
According to documentation, "The mixin provides an
method that accepts an optional
argument and stores it in
," as detailed below
self.get_response(request)to get the response from later middleware and the view.
self.process_response(request, response)(if defined).
- Returns the response.
News of the latest Django release was met online with approval, and repeated requests for Channels .
HackerNews user Tom Forbes commented on the discussion Django 1.10 released "Shame about Channels, but I see the logic in not including it," with user ubernostrum replying "Channels will get there. It just wasn't quite ready on time for 1.10. Hopefully it will be ready on time for 1.11, and then it'll ship in Django."
User passiveincomelg was less sure, saying "I'm somewhat conflicted about Channels. On the one hand it's cool what you can do with it and the design cleverly avoids rewriting all of Django to be async. On the other hand it is crazy how many shenanigans one needs to pull off to achieve what comes for free with Go or Erlang."
Among the features removed are the ability to use a dotted Python path for the
settings, modules including
, support for calling a SQLCompiler directly as an alias for calling its
method, and a number of private APIs.
A free and open source web application framework written in Python, Django is released via a 3-clause BSD license and welcomes contributions from the InfoQ community.
Anyone looking to help improve and contribute towards Django should visit docs.djangoproject.com/en/dev/internals/contributing/ .