--- id: django-upgrade version: "1.31.1" license: MIT license_treatment: permissive maintenance: active --- # django-upgrade — Automatically upgrade your Django project code. License: permissive · Maintenance: active · Downloads: 561.8K/mo ## What it is and what it does django-upgrade is a command-line tool that automatically refactors Django project code to use modern syntax and APIs. It scans your codebase and applies transformations that align with newer Django versions, removing deprecated patterns and updating function calls to their current equivalents. This saves manual effort when upgrading large projects across multiple Django versions. The tool depends on tokenize-rt for safe token-level code manipulation. It targets Django versions from 2.2 through 6.0 and runs on Python 3.10 or later. With active maintenance and broad version support, it's designed to handle the friction of keeping Django codebases current as the framework evolves. Use it for: - Bulk-upgrade a Django 3.2 project to Django 5.0 syntax and APIs in a single pass. - Remove deprecated Django ORM calls and template tags across a large codebase automatically. - Prepare a legacy Django project for a major version jump by applying intermediate upgrade rules. - Enforce modern Django patterns in a team codebase during a scheduled maintenance window. - Reduce manual code review effort by automating repetitive deprecation fixes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Automatically modernizes Django project code by applying syntax and API upgrades across your codebase to match newer Django versions. Yes. django-upgrade is actively maintained, has no security vulnerabilities, installs with minimal friction, and solves a real problem for Django teams managing version upgrades. The MIT license is permissive. Install it if you maintain a Django project and want to reduce the manual work of keeping code aligned with current Django versions. ## Install pip install django-upgrade uv add django-upgrade poetry add django-upgrade ## Installing django-upgrade Before you install: Low friction install with a single runtime dependency. Active maintenance with recent releases and a solid community signal (1228 stars); last commit on 2026-08-13 indicates ongoing development. License in practice: MIT license permits use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install django-upgrade django-upgrade --target-version 5.0 path/to/django/code Requires Python 3.10 or later. Verify before relying: - Specific upgrade rules and which Django versions are supported as targets beyond the framework classifiers listed. - Whether the tool modifies files in-place or requires review before applying changes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 561.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django code modernization, automatic django upgrade, django syntax fixer, upgrade django codebase, django deprecation removal, django api migration tool, django, code-modernization, refactoring-tool [View on SkillFed](https://skillfed.io/packages/django-upgrade) · [View on PyPI](https://pypi.org/project/django-upgrade/)