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/topics/db/managers.txt | |
| parent | 717362d810955b9514e2ccd989f8a1647c9d7a00 (diff) | |
Changed tuple choices to list in docs.
Diffstat (limited to 'docs/topics/db/managers.txt')
| -rw-r--r-- | docs/topics/db/managers.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/db/managers.txt b/docs/topics/db/managers.txt index 6c9e6a4163..a08dddd028 100644 --- a/docs/topics/db/managers.txt +++ b/docs/topics/db/managers.txt @@ -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 |
