diff options
| author | Elif T. Kus <elifkus@gmail.com> | 2016-01-03 12:56:22 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-22 12:12:17 -0500 |
| commit | bca9faae95db2a92e540fbd08505c134639916fe (patch) | |
| tree | 92b34dd8ecf8cf5432c25d43292ebc83b7919350 /docs/internals/contributing/writing-code/coding-style.txt | |
| parent | 79d0a4fdb0d13ba6a843dace2b90ab44e856bd85 (diff) | |
Fixed #26020 -- Normalized header stylings in docs.
Diffstat (limited to 'docs/internals/contributing/writing-code/coding-style.txt')
| -rw-r--r-- | docs/internals/contributing/writing-code/coding-style.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt index 5dfe9c00f9..805741da6d 100644 --- a/docs/internals/contributing/writing-code/coding-style.txt +++ b/docs/internals/contributing/writing-code/coding-style.txt @@ -5,7 +5,7 @@ Coding style 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 @@ -52,7 +52,7 @@ Python style to use regular expression matching. Imports -------- +======= * Use `isort <https://github.com/timothycrosley/isort#readme>`_ to automate import sorting using the guidelines below. @@ -132,7 +132,7 @@ Imports from django.views.generic.base import View Template style --------------- +============== * In Django template code, put one (and only one) space between the curly brackets and the tag contents. @@ -150,7 +150,7 @@ Template style {{foo}} View style ----------- +========== * In Django views, the first parameter in a view function should be called ``request``. @@ -166,7 +166,7 @@ View style # ... Model style ------------ +=========== * Field names should be all lowercase, using underscores instead of camelCase. @@ -240,7 +240,7 @@ Model style ) Use of ``django.conf.settings`` -------------------------------- +=============================== Modules should not in general use settings stored in ``django.conf.settings`` at the top level (i.e. evaluated when the module is imported). The explanation @@ -276,7 +276,7 @@ such as ``django.utils.functional.LazyObject``, ``django.utils.functional.lazy()`` or ``lambda``. Miscellaneous -------------- +============= * Mark all strings for internationalization; see the :doc:`i18n documentation </topics/i18n/index>` for details. @@ -299,7 +299,7 @@ Miscellaneous single trivial change. JavaScript style ----------------- +================ For details about the JavaScript code style used by Django, see :doc:`javascript`. |
