Охватываемые темы: Current LTS Versions, Key Changes in Django 4.x, Key Changes in Django 5.x, Recommendations.
Current LTS Versions
| Version | Type | Supported Until |
|---|---|---|
| Django 4.2 | LTS | April 2026 |
| Django 5.0 | Standard | April 2025 |
| Django 5.1 | Standard | December 2025 |
| Django 5.2 | LTS | April 2028 |
LTS (Long-Term Support) — supported for 3 years instead of 2.
Key Changes in Django 4.x
4.0
CSRF_TRUSTED_ORIGINSnow requires the scheme (https://)zoneinforeplacespytzUniqueConstraintwithviolation_error_message
4.1
- Async class-based views
- Async ORM (
await Task.objects.aget())
4.2 (LTS)
db_default— database-level defaultsGeneratedField— computed columns in the database- PostgreSQL improvements
Key Changes in Django 5.x
5.0
- Logout via POST —
LogoutViewonly accepts POST Field.db_default— default values stored in the database- Facet filters in the admin
5.1
- Form improvements
LoginRequiredMiddleware(alternative to decorators)
5.2 (LTS)
- Composite primary keys (multi-column primary keys)
Recommendations
- New project — Django 5.2 LTS
- Legacy maintenance — Django 4.2 LTS
- Avoid — non-LTS versions (they go end-of-life quickly)
Checking the Version
import django
print(django.VERSION) # (5, 2, 0, 'final', 0)
python -m django --version
💬 Comments (0)
No comments yet
Be the first to share your opinion about this article!