summaryrefslogtreecommitdiff
path: root/tests/backends/models.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@rd.io>2013-03-07 11:24:51 -0800
committerAlex Gaynor <alex.gaynor@rd.io>2013-03-07 11:24:51 -0800
commitbbbd698c7a4dd19e6394660bece7e6e907b0a824 (patch)
tree24eb0a744ad8214976fa01502d85ca47d8446c75 /tests/backends/models.py
parent4cccb85e292fea01b3459cd97d751ed35179a7b7 (diff)
downloaddjango-bbbd698c7a4dd19e6394660bece7e6e907b0a824.tar.gz
Added a ManyToManyField(db_constraint=False) option, this allows not creating constraints on the intermediary models.
Diffstat (limited to 'tests/backends/models.py')
-rw-r--r--tests/backends/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/backends/models.py b/tests/backends/models.py
index 5876cbe52d..94be36cfaf 100644
--- a/tests/backends/models.py
+++ b/tests/backends/models.py
@@ -90,7 +90,10 @@ class Item(models.Model):
@python_2_unicode_compatible
class Object(models.Model):
- pass
+ related_objects = models.ManyToManyField("self", db_constraint=False, symmetrical=False)
+
+ def __str__(self):
+ return str(self.id)
@python_2_unicode_compatible