diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-05-15 05:31:42 -0700 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-05-15 14:31:42 +0200 |
| commit | 97d3321e89c8d4434927bdbc308db1ccffa99d3b (patch) | |
| tree | 47e830992ae4c1007a4962051d0ac64c7c6c4bb2 /docs/internals/contributing | |
| parent | 717362d810955b9514e2ccd989f8a1647c9d7a00 (diff) | |
Changed tuple choices to list in docs.
Diffstat (limited to 'docs/internals/contributing')
| -rw-r--r-- | docs/internals/contributing/writing-code/coding-style.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt index ab7cc0baa9..f9952b3661 100644 --- a/docs/internals/contributing/writing-code/coding-style.txt +++ b/docs/internals/contributing/writing-code/coding-style.txt @@ -258,17 +258,17 @@ Model style * ``def get_absolute_url()`` * Any custom methods -* If ``choices`` is defined for a given model field, define each choice as - a tuple of tuples, with an all-uppercase name as a class attribute on the - model. Example:: +* If ``choices`` is defined for a given model field, define each choice as a + list of tuples, with an all-uppercase name as a class attribute on the model. + Example:: class MyModel(models.Model): DIRECTION_UP = 'U' DIRECTION_DOWN = 'D' - DIRECTION_CHOICES = ( + DIRECTION_CHOICES = [ (DIRECTION_UP, 'Up'), (DIRECTION_DOWN, 'Down'), - ) + ] Use of ``django.conf.settings`` =============================== |
