Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #702 - Documented that ManyToMany fields can't be in unique_tog…

…ether; thanks poirier for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 060783d52ddf73f4b538526a917a19006258149e 1 parent 9fe578c
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
@@ -247,6 +247,12 @@ Django quotes column and table names behind the scenes.
247 247
 
248 248
         unique_together = ("driver", "restaurant")
249 249
 
  250
+    A :class:`~django.db.models.ManyToManyField` cannot be included in
  251
+    unique_together (it's not even clear what that would mean). If you
  252
+    need to validate uniqueness related to a
  253
+    :class:`~django.db.models.ManyToManyField`, look at signals or
  254
+    using an explicit :attr:`through <ManyToManyField.through>` model.
  255
+
250 256
 ``verbose_name``
251 257
 ----------------
252 258
 

0 notes on commit 060783d

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