diff options
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 |
