diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-08-22 12:39:38 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-08-22 19:58:44 +0200 |
| commit | 0eb846605e56044b8f5334a7d735ed744b453c40 (patch) | |
| tree | 3d016abcfe1c81ad18076fbb076e8110f763843d /docs/internals/contributing/writing-code/coding-style.txt | |
| parent | 7d60659e22c869149cc17f2568a8e073412ea219 (diff) | |
Recommend relative imports within Django components.
django-developers thread:
https://groups.google.com/d/msg/django-developers/11XvmVdx58w/sFrF0pL8LTgJ
Diffstat (limited to 'docs/internals/contributing/writing-code/coding-style.txt')
| -rw-r--r-- | docs/internals/contributing/writing-code/coding-style.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt index 54c2bd47e2..ed07bd49a3 100644 --- a/docs/internals/contributing/writing-code/coding-style.txt +++ b/docs/internals/contributing/writing-code/coding-style.txt @@ -67,7 +67,8 @@ Imports * Put imports in these groups: future, standard library, third-party libraries, 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. + statements before ``from module import objects`` in each section. Use absolute + imports for other Django components and relative imports for local components. * On each line, alphabetize the items with the upper case items grouped before the lower case items. |
