Django 23.1 4.1

... what happened!?

Florian Demmer

Django Meetup, 2022-05-30

... what happened!?

  • 2020-03-16: Lockdown 😱
  • 2020-08-04: Django 3.1
  • 2020-11-03 & 2020-12-26: Lockdowns 🤡
  • 2021-04-06: Django 3.2 LTS
  • 2021-11-22: Lockdown
  • 2021-12-07: Django 4.0 🎅
  • 2022-08-22: Django 4.1 ... probably

Highlights - 3.1

  • JSONField for all supported database backends

  • The SESSION_COOKIE_SAMESITE allows 'None' (string)

  • trans and blocktrans template tags renamed to translate and blocktranslate

  • AbstractUser.first_name max_length increased to 150

  • The admin no longer supports Internet Explorer.  😿

Highlights - 3.2 LTS

  • default_app_config deprecated again

  • New decorators for display functions in admin:
    foo.short_description = 'bar' @admin.display(description='bar')

  • Customizing type of auto-created primary keys
    settings: DEFAULT_AUTO_FIELD or per app: AppConfig.default_auto_field

  • Functional indexes: *expressions argument of Index()

Highlights - 4.0

  • migration from pytz to zoneinfo
    Python >= 3.9 or backports.zoneinfo package

  • Basic Redis cache backend (redis-py >= 3.0.0)

  • Template based form rendering
    Form.template_name, Form.render(), ...

  • Functional unique: *expressions arg UniqueConstraint()

  • ArraySubquery() expression, trigram_word_similar lookup

class ArraySubquery(queryset)

Highlights - 4.1

  • More form rendering:
    Form.as_div()
    FORM_RENDERER = "django.forms.renderers.DjangoDivFormRenderer"

  • Asynchronous ORM interface

  • PostgreSQL *AutoField are now identity columns rather than serial columns with sequences.

  • Dropped support for PostgreSQL 10

All the things

https://docs.djangoproject.com/en/dev/releases/3.1

https://docs.djangoproject.com/en/dev/releases/3.2

https://docs.djangoproject.com/en/dev/releases/4.0

https://docs.djangoproject.com/en/dev/releases/4.1

  • my twitter: @fdemmer

  • slides: https://slides.com/fdemmer

Made with Slides.com