<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/django-6-1-lands-with-fetch-modes-pycharm-2026-2-tightens-ai-code-review-cdkub1qu0" -->

---
title: Django 6.1 lands with fetch modes, PyCharm 2026.2...
description: Django 6.1 shipped this week with a new QuerySet.fetch_mode() aimed at killing N+1 queries by default, plus database-level cascade handling and a unified email...
canonical: https://daily.dev/posts/django-6-1-lands-with-fetch-modes-pycharm-2026-2-tightens-ai-code-review-cdkub1qu0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Django 6.1 lands with fetch modes, PyCharm 2026.2 tightens AI code review | daily.dev
og:description: Django 6.1 shipped this week with a new QuerySet.fetch_mode() aimed at killing N+1 queries by default, plus database-level cascade handling and a unified email...
og:url: https://daily.dev/posts/django-6-1-lands-with-fetch-modes-pycharm-2026-2-tightens-ai-code-review-cdkub1qu0
og:image: https://api.daily.dev/og/posts/CdkUB1QU0.png
og:image:alt: Django 6.1 lands with fetch modes, PyCharm 2026.2 tightens AI code review
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Django 6.1 lands with fetch modes, PyCharm 2026.2 tightens AI code review

**[Python Digest](https://daily.dev/sources/python_digest)** · 4 min read · 1 upvotes · 1 comments

## Summary

Django 6.1 shipped this week with a new QuerySet.fetch_mode() aimed at killing N+1 queries by default, plus database-level cascade handling and a unified email config. PyCharm 2026.2 rolled out 263 fixes focused on making AI-generated Django and SQLAlchemy code easier to verify rather than blindly accept. The PSF disclosed that AWS spend on PyPI infrastructure rose 69% year over year, driven partly by AI agents installing packages, while the org runs on a single infrastructure engineer. Elsewhere, a fine-tuning writeup showed QLoRA beating RAG+Claude Opus by a wide margin on a narrow document task, and a Django SaaS team shared a hard lesson about tenant isolation breaking silently after a worker consolidation.

## Content

**TLDR:** Django 6.1 shipped this week with a new QuerySet.fetch_mode() aimed at killing N+1 queries by default, plus database-level cascade handling and a unified email config. PyCharm 2026.2 rolled out 263 fixes focused on making AI-generated Django and SQLAlchemy code easier to verify rather than blindly accept. The PSF disclosed that AWS spend on PyPI infrastructure rose 69% year over year, driven partly by AI agents installing packages, while the org runs on a single infrastructure engineer. Elsewhere, a fine-tuning writeup showed QLoRA beating RAG+Claude Opus by a wide margin on a narrow document task, and a Django SaaS team shared a hard lesson about tenant isolation breaking silently after a worker consolidation.

---

## Django 6.1 ships with fetch modes, DB-level cascades, and a unified mail config

Django 6.1 landed August 5 with QuerySet.fetch_mode() (FETCH_ONE, FETCH_PEERS, FETCH_RAISE) to catch N+1 queries before they hit production, plus database-level ForeignKey delete handling (DB_CASCADE, DB_SET_NULL, DB_SET_DEFAULT) that pushes referential integrity down to the database itself. It also replaces the deprecated EMAIL_BACKEND setup with a single MAILERS config, adds UUID4/UUID7 and JSONNull model fields, and bumps the default PBKDF2 iteration count for password hashing. Several old PostgreSQL, MySQL, MariaDB, and SQLite versions are no longer supported, so check your stack before upgrading. Mainstream support runs to April 2027, security support to December 2027. [Read more](https://daily.dev/posts/tXTlHFob5)

## PyCharm 2026.2 leans hard into reviewing AI-generated code, not just writing it

PyCharm 2026.2 ships 263 fixes, most aimed at making agent output easier to verify: better SQLAlchemy 2.0 type resolution for Mapped fields and hybrid_property setters, sharper control-flow narrowing, and clickable inlay hints. On the Django side it adds 6.0 template partials support, a Logical Structure view for large codebases, and an Endpoints tool window for checking APIs and DB state after agent-driven migrations. JetBrains is explicit about the positioning here - the IDE is the layer where you catch what your coding agent got wrong, with BYOK support for Codex, Claude Agent, Junie, Gemini, and local models via Ollama or LM Studio. [Read more](https://daily.dev/feed-by-ids?id=TFLQHhDGm&id=IuIwOFvCk)

## PyPI's AWS bill jumped 69% as AI agents join the download traffic

The PSF's engineering director laid out how AWS credits keep PyPI's infrastructure near-free, but spend still rose 69% year over year in July 2026 - driven by growing Python adoption, CI runs, and AI agents installing packages on their own. Fastly absorbs about 99% of PyPI's 3-6 billion daily requests, which is the only thing keeping the AWS bill sane. The PSF is down to one full-time infrastructure engineer and is openly calling PyPI a supply-chain risk without more funding, asking companies to cache installs or sign service agreements instead of hammering the index directly. [Read more](https://daily.dev/posts/ZBzijOt7P)

## QLoRA fine-tuning beats RAG+Claude Opus 4.6 by 63 points on a narrow document task

A detailed writeup on fine-tuning a 7B Mistral model with QLoRA for filling out rigid breast cancer synoptic report templates found prompting plus RAG with Claude Opus 4.6 topped out around 35% strict document accuracy, while the fine-tuned model hit roughly 98%. The projected API cost for the RAG approach was about $320,000, versus a single consumer GPU for fine-tuning. It's a useful data point for anyone assuming RAG is always the cheaper, faster path - for narrow, format-rigid tasks it clearly isn't. [Read more](https://daily.dev/posts/dGv3RUC1u)

---

## Also notable

- **Tenant isolation broke silently after a worker consolidation:** A Django SaaS team found that merging per-tenant worker deployments into one autoscaled pool silently removed an accidental isolation guarantee, and fixed it by pairing a per-task PostgreSQL search_path decorator with per-tenant database roles enforced at the DB level. [Read more](https://daily.dev/posts/eCAaXLxEq)
- **django-upgrade 1.32.0 ships 44 bug fixes found entirely by Claude:** Given only the prompt "Find and fix bugs," Claude caught a five-year-old bug that swapped html.unescape() for html.escape() and a TestCase.multi_db=False flag that was blocking all database queries instead of just non-default ones. [Read more](https://daily.dev/posts/zALYaL9Xx)
- **Mypy 2.3 ships a lock 2-4x faster than threading.Lock for free-threaded builds:** Mypy 2.3.0 adds memory-safe list operations and a new librt.threading.Lock for mypyc-compiled code on no-GIL Python, alongside plans to make the native parser (--native-parser) the default soon. [Read more](https://daily.dev/posts/RPUcaScF7)
- **Snagboot 3.0 drops Kivy for Qt6 to unblock Python 3.14 support:** The embedded board recovery tool rewrote its Snagfactory GUI from Kivy to PySide6 because Kivy hasn't shipped a release since 2024, and added support for Qualcomm's IQ9075 and several TI SoCs. [Read more](https://daily.dev/posts/7nYaz6mi3)

## Community discussion

Top comments from developers on daily.dev.

**@ajaychoudhary80** · 0 upvotes

> Interesting week for Django—performance, AI-assisted development, and infrastructure reliability are all becoming equally important.

## Similar posts on daily.dev

- [PyCharm for AI-assisted Django Workflows](https://daily.dev/posts/pycharm-for-ai-assisted-django-workflows-iuiwofvck) · JetBrains · 0 upvotes · 0 comments
- [Django 2025 Survey Results and Django's annual fundraiser](https://daily.dev/posts/django-2025-survey-results-and-django-s-annual-fundraiser-kycetswyk) · Django News · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#devtools](https://daily.dev/tags/devtools), [#deep-learning](https://daily.dev/tags/deep-learning), [#django](https://daily.dev/tags/django)

[View this post on daily.dev](https://daily.dev/posts/django-6-1-lands-with-fetch-modes-pycharm-2026-2-tightens-ai-code-review-cdkub1qu0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/django-6-1-lands-with-fetch-modes-pycharm-2026-2-tightens-ai-code-review-cdkub1qu0","headline":"Django 6.1 lands with fetch modes, PyCharm 2026.2 tightens AI code review","text":"Django 6.1 shipped this week with a new QuerySet.fetch_mode() aimed at killing N+1 queries by default, plus database-level cascade handling and a unified email config. PyCharm 2026.2 rolled out 263 fixes focused on making AI-generated Django and SQLAlchemy code easier to verify rather than blindly accept. The PSF disclosed that AWS spend on PyPI infrastructure rose 69% year over year, driven partly by AI agents installing packages, while the org runs on a single infrastructure engineer. Elsewhere, a fine-tuning writeup showed QLoRA beating RAG+Claude Opus by a wide margin on a narrow document task, and a Django SaaS team shared a hard lesson about tenant isolation breaking silently after a worker consolidation.","url":"https://daily.dev/posts/django-6-1-lands-with-fetch-modes-pycharm-2026-2-tightens-ai-code-review-cdkub1qu0","datePublished":"2026-08-24T04:20:05.416Z","dateModified":"2026-09-13T20:57:39.953Z","author":{"@type":"Organization","name":"Python Digest","logo":"https://media.daily.dev/image/upload/s--_8Rk7XLS--/f_auto,q_auto/v1776326905/logos/python_digest","url":"https://daily.dev/sources/python_digest"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"comment":[{"@type":"Comment","text":"Interesting week for Django—performance, AI-assisted development, and infrastructure reliability are all becoming equally important.","datePublished":"2026-08-24T11:28:42.280Z","url":"https://daily.dev/posts/CdkUB1QU0#c-rqEZbXtFA","author":{"@type":"Person","name":"Ajay Choudhary","url":"https://daily.dev/ajaychoudhary80","image":"https://media.daily.dev/image/upload/s--WkX8wDW2--/f_auto/v1780989706/avatars/avatar_QNZlI2SgVnNSx5PSRpCVx?_a=BAMAMiWQ0"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/python_digest","name":"Python Digest"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Python Digest","item":"https://daily.dev/sources/python_digest"},{"@type":"ListItem","position":3,"name":"Django 6.1 lands with fetch modes, PyCharm 2026.2 tightens AI code review"}]}
```

