summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2019-04-22 09:31:08 +0300
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-04-24 10:06:00 +0200
commit0c916255eb4d94e06e123fafec93efdba45b1259 (patch)
tree5ba7368463f7dc872f7bf8bfee93dd9020806037 /docs/ref
parent607ff4efa31cd0c2217ed021dc939ffddad89c97 (diff)
Changed tuple Mate.unique_together/permissions to lists in docs.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/options.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
index d28cd3fe16..6a50da5184 100644
--- a/docs/ref/models/options.txt
+++ b/docs/ref/models/options.txt
@@ -309,7 +309,7 @@ Django quotes column and table names behind the scenes.
Add, change, delete, and view permissions are automatically created for each
model. This example specifies an extra permission, ``can_deliver_pizzas``::
- permissions = (("can_deliver_pizzas", "Can deliver pizzas"),)
+ permissions = [('can_deliver_pizzas', 'Can deliver pizzas')]
This is a list or tuple of 2-tuples in the format ``(permission_code,
human_readable_permission_name)``.
@@ -408,17 +408,17 @@ Django quotes column and table names behind the scenes.
Sets of field names that, taken together, must be unique::
- unique_together = (("driver", "restaurant"),)
+ unique_together = [['driver', 'restaurant']]
- This is a tuple of tuples that must be unique when considered together.
+ This is a list of lists that must be unique when considered together.
It's used in the Django admin and is enforced at the database level (i.e., the
appropriate ``UNIQUE`` statements are included in the ``CREATE TABLE``
statement).
- For convenience, unique_together can be a single tuple when dealing with a single
- set of fields::
+ For convenience, ``unique_together`` can be a single list when dealing with
+ a single set of fields::
- unique_together = ("driver", "restaurant")
+ unique_together = ['driver', 'restaurant']
A :class:`~django.db.models.ManyToManyField` cannot be included in
unique_together. (It's not clear what that would even mean!) If you