Hasty Briefsbeta

Django: what’s new in 6.0

2 days ago
  • #Python
  • #Web Development
  • #Django
  • Django 6.0 introduces template partials for better encapsulation and reuse within templates.
  • A new built-in Tasks framework allows running background tasks outside the HTTP request-response cycle.
  • Content Security Policy (CSP) support is now built into Django for enhanced security against XSS attacks.
  • Email handling in Django now uses Python's modern email API, offering a cleaner and Unicode-friendly interface.
  • Dynamic field refresh on `save()` is now supported for `GeneratedField` and fields with expressions on backends that support the `RETURNING` clause.
  • The `StringAgg` aggregate is now universally available across all supported database backends.
  • `BigAutoField` is now the default primary key type to prevent primary key exhaustion.
  • New template enhancements include `forloop.length` and improvements to the `querystring` template tag.