How to use this developer tool
- Paste Django or Python source.
- Select a general or Django-specific structural style.
- Choose the indentation width.
- Format the source and compare changed-line statistics.
Normalize Django and Python source with safe whitespace, indentation, blank-line, import, assignment, and URL-layout formatting.
Your code is processed locally in your browser and is not uploaded by this tool.
The formatter applies conservative text transformations for whitespace, imports, blank lines, indentation, assignments, commas, and common function signatures.
This browser-based formatter does not replace Black, Ruff, isort, autopep8, or Python AST-based formatting.
The input products=Product.objects.all() is normalized to products = Product.objects.all().
No. It applies conservative browser-based transformations and does not implement Black's AST rules.
It can alphabetize simple top-level import lines.
The formatter is designed to avoid semantic changes, but all formatted code should still be reviewed and tested.
Yes. A settings-oriented mode applies the same safe normalization without evaluating values.
No. Formatting occurs locally in the browser.
| Whitespace | Trailing spaces and repeated blank lines |
|---|---|
| Indentation | Tabs to configurable spaces |
| Spacing | Assignments, commas, and function arguments |
| Imports | Optional simple import sorting |