Here comes Django 2.0

After a lot of development, Django 2.0 has its first alpha release today!

In this series we look at the new features coming in this major release.

To start, let's look at a feature that addresses some pain for many site administrators: mobile device support.

Mobile-friendly admin site

From the release notes for Django 2.0:

Mobile-friendly contrib.admin

The admin is now responsive and supports all major mobile devices. Older [browsers] may experience varying levels of graceful degradation.

What does this mean?

The default admin site in Django 1.x assumes a desktop or notebook device with a large display. This means it requires a lot of horizontal space, and has a lot of text that assumes a relatively small font.

The admin site for a Django 1.x project

For a mobile device, the fonts need to be larger (because the pixels tend to be significantly smaller) and the available space is limited. Both of these constrain the amount of information from a page that can be readably displayed on a mobile device.

The admin site for a Django 1.x project, on mobile

A “responsive” page design means that the same site will serve a page that responds differently on these different devices. So there will be more packed into the page on a larger display, and less on a smaller display, with both being quite readable.

The admin site for a Django 2.0 project, on mobile

Site administrators increasingly use mobile devices for access to tools like the Django Admin site. This change is welcome for all the reasons that responsive sites are good for users in general.


Do you have questions about Django, or want to hire me for some work in a Django-related project? Come chat to me either privately at my Matrix address @bignose:matrix.org, or in the public Django chat channel.


    Tags: