Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.3.X] Fixed #702 - Documented that ManyToMany fields can't be in un…

…ique_together; thanks poirier for the patch.

Backport of r17314 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@17315 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 580389c588ade9709f54c1494c5af6747011f043 1 parent 7b9016e
Tim Graham authored December 31, 2011

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  docs/ref/models/options.txt
6  docs/ref/models/options.txt
@@ -238,6 +238,12 @@ Django quotes column and table names behind the scenes.
238 238
 
239 239
         unique_together = ("driver", "restaurant")
240 240
 
  241
+    A :class:`~django.db.models.ManyToManyField` cannot be included in
  242
+    unique_together (it's not even clear what that would mean). If you
  243
+    need to validate uniqueness related to a
  244
+    :class:`~django.db.models.ManyToManyField`, look at signals or
  245
+    using an explicit :attr:`through <ManyToManyField.through>` model.
  246
+
241 247
 ``verbose_name``
242 248
 ----------------
243 249
 

0 notes on commit 580389c

Please sign in to comment.
Something went wrong with that request. Please try again.