summaryrefslogtreecommitdiff
path: root/docs/internals/contributing/writing-code/coding-style.txt
diff options
context:
space:
mode:
authorTrey Hunner <trey@treyhunner.com>2015-04-27 21:12:31 -0700
committerTim Graham <timograham@gmail.com>2015-06-27 16:36:26 -0400
commitec4f219ecb7a5e43d0353633fac4dac42d0ee492 (patch)
tree149080086a963899ec8ca36f7ad8e086f81ce521 /docs/internals/contributing/writing-code/coding-style.txt
parent1e63652e44f1c12c6e0fec6dacfae0c865b7cdbf (diff)
Fixed #22463 -- Added code style guide and JavaScript linting (EditorConfig and ESLint)
Diffstat (limited to 'docs/internals/contributing/writing-code/coding-style.txt')
-rw-r--r--docs/internals/contributing/writing-code/coding-style.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt
index 2aa967c88d..54c2bd47e2 100644
--- a/docs/internals/contributing/writing-code/coding-style.txt
+++ b/docs/internals/contributing/writing-code/coding-style.txt
@@ -7,6 +7,11 @@ Please follow these coding standards when writing code for inclusion in Django.
Python style
------------
+* Please conform to the indentation style dictated in the ``.editorconfig``
+ file. We recommend using a text editor with `EditorConfig`_ support to avoid
+ indentation and whitespace issues. The Python files use 4 spaces for
+ indentation and the HTML files use 2 spaces.
+
* Unless otherwise specified, follow :pep:`8`.
Use `flake8`_ to check for problems in this area. Note that our ``setup.cfg``
@@ -286,4 +291,11 @@ Miscellaneous
change to the ``AUTHORS`` file in your patch if you make more than a
single trivial change.
+JavaScript style
+----------------
+
+For details about the JavaScript code style used by Django, see
+:doc:`javascript`.
+
+.. _editorconfig: http://editorconfig.org/
.. _flake8: https://pypi.python.org/pypi/flake8