In association with heise online

27 February 2013, 12:25

Django 1.5 unleashed with first Python 3 support

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Django logo

The developers of the Python-based web application development framework Django have released the first version of the open source framework to support Python 3. Django 1.5 also introduces a new user model that allows developers to tailor the format of user credentials to their particular application.

Python 3 support is a feature that the Django development team has been working on for a long time and, as expected, it is currently classed as experimental. The next release, Django 1.6, is planned to "support Python 3 without reservations." However, the team points out that with this release, developers can start porting their applications to Python 3 so that they are ready to migrate to it in production use when Django 1.6 arrives. Changes required to Django applications because of the change in Python versions will vary from application to application; interested users can find a guide to porting their software to Python 3 in the Django documentation.

As the Django developers note, Python 3 support is far from ready to be used for production applications in most cases. Parts of Django that currently don't work with Python 3 because of third party software that has not been ported yet include the ImageField and the MySQL backend. As the release notes put it: "At this point, very few third-party applications have been ported to Python 3, so it’s unlikely that a real-world application will have all its dependencies satisfied under Python 3."

Back in the non-experimental arena, the minimum version of Python supported by Django 1.5 is Python 2.6.5, but the developers strongly recommend Python 2.7.3 or later. The highlight of the new non-experimental features for Django coders is the new configurable user model which gives application developers flexibility in what information they include with user records. It replaces Django's built-in user model and allows developers to customise user names and include their own profile information fields. Other new features include better caching of models to save on database queries, the ability to save only a subset of a model's fields, a new "verbatim" tag for JavaScript templates which skips parsing of its contents, and explicit support for streaming HTTP responses. GeoDjango now supports PostGIS 2.0 and the project's documentation includes a number of new tutorials.

Django 1.5 can be downloaded from the project's web site and the source code for the framework is available on GitHub. It can also be installed with the pip package manager. Django is licensed under the BSD License.

(fab)

Print Version | Send by email | Permalink: http://h-online.com/-1812473
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit