1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[2.2.x] Changed tuple choices to list in docs.

Backport of 97d3321e89 from master
This commit is contained in:
Jon Dufresne
2019-05-15 05:31:42 -07:00
committed by Carlton Gibson
parent f6febbc078
commit 08c8838727
8 changed files with 27 additions and 27 deletions

View File

@@ -161,7 +161,7 @@ For example::
class Person(models.Model):
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
role = models.CharField(max_length=1, choices=(('A', _('Author')), ('E', _('Editor'))))
role = models.CharField(max_length=1, choices=[('A', _('Author')), ('E', _('Editor'))])
people = models.Manager()
authors = AuthorManager()
editors = EditorManager()
@@ -261,7 +261,7 @@ custom ``QuerySet`` if you also implement them on the ``Manager``::
class Person(models.Model):
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
role = models.CharField(max_length=1, choices=(('A', _('Author')), ('E', _('Editor'))))
role = models.CharField(max_length=1, choices=[('A', _('Author')), ('E', _('Editor'))])
people = PersonManager()
This example allows you to call both ``authors()`` and ``editors()`` directly from