diff options
Diffstat (limited to 'docs/internals/contributing/writing-code')
| -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`` =============================== |
