Franky Bonanno
Django 6.1 with Python 3.14

← Books

Django 6.1 with Python 3.14

Technical book · 2026 · EN · Python e Django

Learn Django 6.1 by building real applications, not by reading a list of new features.

Django 6.0 and 6.1 brought a lot of changes, and Python 3.14 brought more. This book teaches them the only way they really sink in: inside projects that make sense. You start with a task manager and finish with a document management system running behind HTTPS on a server. Each project introduces one new technology and revisits the ones you have already met, so every tool shows up several times, in different contexts, until it becomes second nature.

WHAT YOU WILL BUILD

A task manager (Project 1): models, migrations, admin, forms, templates and your first tests.

A blog with PostgreSQL (Project 2): arrays, indexed JSON, full-text search with ranking and highlighting, and tests against a real database.

A shop with an interactive cart (Project 3): HTMX for live interfaces without writing JavaScript, async views and Django 6.1's fetch modes against the N+1 problem.

A knowledge base that answers questions (Project 4): embeddings and semantic search with pgvector, HNSW indexes, and a question-answering flow built on your own documents.

Background jobs (Project 5): Django's task API and what it does not do, PostgreSQL versus Redis queues, idempotent tasks, retries with backoff, recovering tasks lost when a worker dies, and the new MAILERS setting.

A multi-tenant helpdesk (Project 6): three multi-tenancy strategies compared, row-level security, API keys and a REST API.

DjangoVault (final case study): a document management system with versions, review workflow, semantic search, UUIDv7 keys and 98 tests, from tutorial to product.

Then the book takes you off the laptop: tests, continuous integration, Docker, Caddy with HTTPS, gunicorn, backups and a deployment checklist.

WHAT IS NEW, AND COVERED WHERE IT MATTERS

Python 3.14: template strings (t-strings), deferred annotations, compression.zstd, the new REPL, subinterpreters and free-threading, uuid.uuid7().

Django 6.0 and 6.1: the tasks framework, the new MAILERS setting, calendar versioning, the new default for DEFAULT_AUTO_FIELD, DB_CASCADE, JSONNull, the customizable upload parser, fetch modes and more.

Tools: uv for projects, environments and lockfiles; pytest-django; ruff.

HONEST BY DESIGN

Every output in this book was obtained by running the code: Python 3.14.6, Django 6.1.2, PostgreSQL 18.6 and pgvector 0.8. When something is experimental, or I did not verify it, the book says so in a box. You will also find "Pitfall" boxes with real errors, the exact message you will see, and how to solve them, plus a whole appendix of common problems.

THREE APPENDICES YOU WILL ACTUALLY USE

Upgrading from Django 5.2 to 6.0 and 6.1: a step-by-step procedure checked with probes against the three real versions, with a checklist.

Common problems and how to solve them: real error messages for configuration, database, migrations, tests, server, browser and tasks.

Library compatibility: which versions of the most popular Django libraries work with Django 6.1.

THE CODE

All the code of the six projects and of the final case study comes with the book, in a companion repository: one folder per chapter and one git tag per chapter, so you can always compare your work with the book's. The address is on the last page of the book.

WHO THIS BOOK IS FOR

Anyone who knows Python and has heard of Django, even if only from tutorials. If you have been using Django for years, you will find the new features of 6.0 and 6.1 in context, plus the parts that are rarely explained: PostgreSQL in depth, vector search, background jobs, multi-tenancy and production deployment.

WHAT YOU NEED

A computer with Linux, macOS or Windows and a terminal. You do not even need to install Python in advance: the first chapter does it with uv.

ABOUT THE AUTHOR

Franky Bonanno is a developer and entrepreneur from Catania, Sicily, with more than twenty years of experience in IT, including a stint as CTO. He builds and maintains several SaaS platforms in Django and also writes novels.