diff options
author | Alex Gaynor <alex.gaynor@rd.io> | 2013-03-07 11:24:51 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@rd.io> | 2013-03-07 11:24:51 -0800 |
commit | bbbd698c7a4dd19e6394660bece7e6e907b0a824 (patch) | |
tree | 24eb0a744ad8214976fa01502d85ca47d8446c75 /tests/backends/models.py | |
parent | 4cccb85e292fea01b3459cd97d751ed35179a7b7 (diff) | |
download | django-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.py | 5 |
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 |