mirror of
https://github.com/django/django.git
synced 2025-11-19 11:15:44 +00:00
Cautioned against multi-level relative imports in coding style docs.
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
This commit is contained in:
parent
54cfb5f328
commit
a545eb0c1a
1 changed files with 3 additions and 2 deletions
|
|
@ -150,8 +150,9 @@ Imports
|
|||
other Django components, local Django component, try/excepts. Sort lines in
|
||||
each group alphabetically by the full module name. Place all
|
||||
``import module`` statements before ``from module import objects`` in each
|
||||
section. Use absolute imports for other Django components and relative
|
||||
imports for local components.
|
||||
section. Use absolute imports for other Django components and a one-dot
|
||||
relative import (``from .foo import Bar``) for local components. Avoid
|
||||
multi-dot relative imports.
|
||||
|
||||
* On each line, alphabetize the items with the upper case items grouped before
|
||||
the lowercase items.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue