The Django coding style suggests a standard order of model attributes. Increasing standardisation and predictability of your code style helps other developers read your code.
The Django Coding Style suggests the following order of inner classes, methods and attributes:
This standardisation is very useful when Python should be written to be read.
If we spot this issue in your GitHub pull request we give this advice:
Django Doctor will run this check by default. No configuration is needed but the check can be turned on/off using check code
model-method-order in your pyproject.toml file.