RepoJournal
Django

@django

Python's batteries-included web framework

Pick a date

The Wire · Showcase

DJANGO FIXES MIGRATION CRASH, TIGHTENS COLLECTSTATIC

By RepoJournal · Filed · About Django

Django's sqlmigrate command no longer crashes when renaming models with self-referential foreign keys, while the build system cuts false positives in static file collection.

The migration engine had a critical blind spot: when collecting SQL for operations like sqlmigrate, RenameModel operations weren't recording table renames, so subsequent field alterations tried to introspect tables that didn't exist yet [1]. On MySQL this threw an error; on PostgreSQL it silently dropped self-referential foreign key constraints. That's fixed. Simultaneously, the collectstatic command got smarter about what it ignores [2]. It now treats strings as legitimate content in both CSS and JavaScript, drastically reducing false positives where import statements in code got mangled during collection. Both patches land in the next release. The djangoproject.com site itself picked up security hygiene improvements, adding PyPI token revocation to the release checklist [3] and fixing deprecated HTML attributes in the module index [4]. Release documentation also got hardened with formal security standards [5], signaling tighter controls on how Django ships.

Action items

References

  1. [1] Fixed #33185 -- Fixed sqlmigrate crash for RenameModel with a self-referential foreign key. django/django
  2. [2] Fixed #36969, #35371 -- Reduced false positives in strings during collectstatic. ↗ django/django
  3. [3] [checklists] Added PyPI token revocation to checklist. django/djangoproject.com
  4. [4] Replaced deprecated name attribute with id in py-modindex.html. django/djangoproject.com
  5. [5] Doc'd security standards in howto-release-django.txt. django/django

FAQ

What changed in Django on June 12, 2026?
Django's sqlmigrate command no longer crashes when renaming models with self-referential foreign keys, while the build system cuts false positives in static file collection.
What should Django teams do about it?
Review the sqlmigrate fix if you have RenameModel operations in pending migrations • Test collectstatic behavior in your next CI run if you have JavaScript imports in assets
Which Django repositories shipped on June 12, 2026?
django/django, django/djangoproject.com

Related across the cluster

For your repos

The showcase is a teaser.
Your wire is the product.

Same engine. Different stack. Below: what changes when the wire is yours.

Showcase wire

  • 14 famous open source orgs
  • One wire per day
  • Public, generic
  • Read on the web, when you remember

Your wire

  • Up to 1,500 of your repos - orgs, deps, vendors
  • Morning and evening briefs
  • Action items routed to your team
  • Slack delivery, email, breaking-news CVE alerts

Want a hands-on demo first? Ask a current user for an invite link.