From 97d3321e89c8d4434927bdbc308db1ccffa99d3b Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Wed, 15 May 2019 05:31:42 -0700 Subject: Changed tuple choices to list in docs. --- docs/internals/contributing/writing-code/coding-style.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/internals/contributing/writing-code') 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`` =============================== -- cgit v1.3