Leanpub Header

Skip to main content

Django 6.1 with Python 3.14

From your first project to production: complete web applications with PostgreSQL, semantic search with pgvector, and dynamic interfaces with HTMX

Django 6.1 with Python 3.14
This book is 100% completeLast updated on 2026-10-10
Build six complete Django projects, plus a final case study, with the latest Django and Python: PostgreSQL, full-text and semantic search, HTMX, background jobs, multi-tenancy, tests, Docker and deployment. Every result in the book was produced by actually running the code.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

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.

Author

About the Author

Franky Bonanno
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.

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub