Django 2.0 beta available now

Beta version of new major release of popular Python framework out now
17 October 2017   2357

Great news for Python developers and Django fans. Beta version of Django 2.0 out now. 

What's new in Django 2.0 beta? 

  • Simplified URL routing syntax
    • The new django.urls.path() function allows a simpler, more readable URL routing syntax. For example, this example from previous Django releases:
      • url(r'^articles/(?P<year>[0-9]{4})/$', views.year_archive),
        
    • could be written as:
      • path('articles/<int:year>/', views.year_archive),
  • Mobile-friendly contrib.admin
    • The admin is now responsive and supports all major mobile devices. Older browser may experience varying levels of graceful degradation
  • Window expressions
    • The new Window expression allows adding an OVER clause to querysets. You can use window functions and aggregate functions in the expression.
  • Removed support for bytestrings in some places
    • To support native Python 2 strings, older Django versions had to accept both bytestrings and unicode strings. Now that Python 2 support is dropped, bytestrings should only be encountered around input/output boundaries (handling of binary fields or HTTP streams, for example). You might have to update your code to limit bytestring usage to a minimum, as Django no longer accepts bytestrings in certain code paths.

Python compatibility

Django 2.0 supports Python 3.4, 3.5, and 3.6. Developers highly recommend  and officially support the latest release of each series.

The Django 1.11.x series is the last to support Python 2.7.

Django 2.0 will be the last release series to support Python 3.4. If you plan a deployment of Python 3.4 beyond the end-of-life for Django 2.0 (April 2019), stick with Django 1.11 LTS (supported until April 2020) instead. Note, however, that the end-of-life for Python 3.4 is March 2019.

Learn more at official release notes

You can download Django 2.0 beta at official website

 

Python News Digest 8 - 14.02

Learn about the best Python tools, why sys.getsizeof is not what you need, how to call await on multiple functions and more
14 February 2020   246

Greetings! I hope your week went great! Here's new Python news digest.

Learn how parallelism can slow down your Python code, implementing interface in Python, how to check if a file is a valid image with Python and other intersting things awaits for you in this digest.

Articles

  • Understanding Best Practice Python Tooling by Comparing Popular Project Templates

Author checked and compare the most popular Python tools in this big article

  • The Parallelism Blues: when faster code is slower

Learn when, why and how parallelism can slow down your Python app

  • sys.getsizeof is not what you want

Learn why sys.getsizeof counts not all the bytes, and even wrong bytes

Guides

  • Implementing an Interface in Python

Tutorial for beginners on how to use a Python interface; understand why interfaces are so useful and learn how to implement formal and informal interfaces in Python

  • Python asyncio and await'ing multiple functions

In this tiny tutorial, you'll learn how to call await on multiple functions in Python using the asyncio package

  • How to Check if a File is a Valid Image with Python

Really small, but a useful tutorial that we will show you how to check if a certain file is a valied image using Python

  • Understand Group by in Django with SQL

Learn and understand what GROUP BY in Django ORM is by comparing QuerySets and SQL

Updates

  • virtualenv

A virtual environment builder for Python