# adamchainz/django-upgrade

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/adamchainz-django-upgrade).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

1,214 stars · 81 forks · Python · MIT

## Links

- GitHub: https://github.com/adamchainz/django-upgrade
- Homepage: https://django-upgrade.readthedocs.io/en/latest/
- awesome-repositories: https://awesome-repositories.com/repository/adamchainz-django-upgrade.md

## Topics

`django`

## Description

Django-upgrade is a command-line tool that automatically modernizes legacy Python and Django codebases by rewriting outdated syntax patterns into current idioms. It operates as a static analysis linter and source code transformation engine, parsing files to identify deprecated constructs and replacing them in place while preserving project integrity.

The software uses a rule-based transformation architecture driven by abstract syntax tree parsing to execute modular refactoring tasks. Developers can configure target version settings to ensure the tooling only applies updates appropriate for their minimum framework requirements, handling codebase maintenance and dependency refactoring across large software projects.

## Tags

### Development Tools & Productivity

- [Automated Code Refactoring](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-and-transformation/automated-code-refactoring.md) — Automates code refactoring by transforming legacy Python and Django constructs into modern equivalents. ([source](https://django-upgrade.readthedocs.io/](https://django-upgrade.readthedocs.io/))
- [Automated Codebase Maintenance](https://awesome-repositories.com/f/development-tools-productivity/workflow-automation-tools/development-automation/automated-codebase-maintenance.md) — Automates repetitive refactoring tasks across large software projects to maintain code standards.
- [Static Analysis Engines](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines.md) — Inspects Python source files without execution to identify deprecated constructs across the codebase.

### Software Engineering & Architecture

- [Pattern-Based Replacements](https://awesome-repositories.com/f/software-engineering-architecture/code-transformation-tools/pattern-based-replacements.md) — Matches specific outdated patterns against source code and applies pattern-based replacements to update them.
- [Python Refactoring Libraries](https://awesome-repositories.com/f/software-engineering-architecture/automated-refactoring-tools/python-refactoring-libraries.md) — Refactors Python source files to adopt newer language features and library idioms.
- [Syntax Tree Transformers](https://awesome-repositories.com/f/software-engineering-architecture/trees/syntax-tree-construction/syntax-tree-transformers.md) — Parses Python code into a syntax tree to perform structured transformations and rewrite outdated syntax.

### Web Development

- [Project Modernizers](https://awesome-repositories.com/f/web-development/django-frameworks/project-modernizers.md) — Upgrades older Django project codebases to newer syntax and idioms automatically during framework updates.
- [Upgraders](https://awesome-repositories.com/f/web-development/django-frameworks/upgraders.md) — Automatically modernizes legacy Django code patterns to newer idioms and resolves framework deprecations. ([source](https://django-upgrade.readthedocs.io/en/latest/))

### Data & Databases

- [Target Version Configuration](https://awesome-repositories.com/f/data-databases/database-versioning/database-version-inspectors/target-version-configuration.md) — Allows developers to specify target version settings to ensure code upgrades match their minimum framework requirements.

### Testing & Quality Assurance

- [Static Code Analysis](https://awesome-repositories.com/f/testing-quality-assurance/static-code-analysis.md) — Operates as a static analysis linter and fixer that detects deprecated syntax and rewrites it in place.
- [Python Code Modernizers](https://awesome-repositories.com/f/testing-quality-assurance/static-code-analysis/python-code-modernizers.md) — Provides a CLI tool that automatically modernizes Django Python code to match newer framework versions.
