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:
committed by
Carlton Gibson
parent
f6febbc078
commit
08c8838727
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user