1. Luke Plant
  2. django


ti...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 426d1c3

[1.3.X] Fixed #702 - Documented that ManyToMany fields can't be in unique_together; thanks poirier for the patch.

Backport of r17314 from trunk.

  • Participants
  • Parent commits 75c0553
  • Branches releases/1.3.X

Comments (0)

Files changed (1)

File docs/ref/models/options.txt

View file
         unique_together = ("driver", "restaurant")
+    A :class:`~django.db.models.ManyToManyField` cannot be included in
+    unique_together (it's not even clear what that would mean). If you
+    need to validate uniqueness related to a
+    :class:`~django.db.models.ManyToManyField`, look at signals or
+    using an explicit :attr:`through <ManyToManyField.through>` model.